spec/plugin-api.spec.js
function __createWaveform(options = {}) {
        waveformDiv = document.createElement('div');
        document.getElementsByTagName('body')[0].appendChild(waveformDiv);

        wavesurfer = WaveSurfer.create(
            Object.assign(
                {
                    container: waveformDiv
                },
                options
            )
        );
        wavesurfer.load(TestHelpers.EXAMPLE_FILE_PATH);
    }
function __createWaveform(options = {}) {
        waveformDiv = document.createElement('div');
        document.getElementsByTagName('body')[0].appendChild(waveformDiv);

        wavesurfer = WaveSurfer.create(
            Object.assign(
                {
                    container: waveformDiv
                },
                options
            )
        );
        wavesurfer.load(TestHelpers.EXAMPLE_FILE_PATH);
    }
function __createWaveform ( options = { } ) { waveformDiv = document . createElement ( 'div' ) ; document . getElementsByTagName ( 'body' ) [ 0 ] . appendChild ( waveformDiv ) ; wavesurfer = WaveSurfer . create ( Object . assign ( { container : waveformDiv } , options ) ) ; wavesurfer . load ( TestHelpers . EXAMPLE_FILE_PATH ) ; }
utility function to generate wavesurfer instances for testing
utility function to generate wavesurfer instances for testing