Home Manual Reference Source Test

Test

Description Identifier Count

empty cache returns full range

PeakCache#addRangeToPeakCache

different length clears cache

PeakCache#addRangeToPeakCache

consecutive calls return no ranges

PeakCache#addRangeToPeakCache

sliding window returns window sized range

PeakCache#addRangeToPeakCache

disjoint set creates two ranges

PeakCache#getCacheRanges

filling in disjoint sets coalesces

PeakCache#getCacheRanges

filling in disjoint sets coalesces / edge cases

PeakCache#getCacheRanges

addPlugin adds staticProps and correctly builds and instantiates plugin class

WaveSurfer#addPlugin

initPlugin calls init function of the plugin and adds its name to the initialisedPluginList

WaveSurfer#initPlugin

destroyPlugin calls plugin destroy function and removes the plugin name from the initialisedPluginList

WaveSurfer#destroyPlugin

registerPlugin adds a plugin but does not call plugin init function if the plugin property deferInit is truethy

WaveSurfer#registerPlugins

registerPlugin adds a plugin ands calls plugin init function if the plugin property deferInit is falsey

WaveSurfer#registerPlugins

getId returns a random string

getId

min returns the smallest number in the provided array

min

min returns +Infinity for an empty array

min

max returns the largest number in the provided array

max

max returns -Infinity for an empty array

max

should play

WaveSurfer#play WaveSurfer#isPlaying

should pause

WaveSurfer#play WaveSurfer#isPlaying WaveSurfer#pause

should play or pause

WaveSurfer#playPause WaveSurfer#isPlaying

should get duration

WaveSurfer#getDuration

should toggle mute

WaveSurfer#toggleMute

should set mute

WaveSurfer#setMute