diff --git a/test/suite.ts b/test/suite.ts index 496b568..309c1ba 100644 --- a/test/suite.ts +++ b/test/suite.ts @@ -326,19 +326,6 @@ function suite(useLegacy = false): void } }); - if (!useLegacy) - { - describe(`filters.DistortionFilter${suffix}`, () => - { - it('should create a DistortionFilter', () => - { - const filter = new filters.DistortionFilter(0.5); - - expect(filter.amount).toBe(0.5); - }); - }); - } - describe(`SoundInstance${suffix}`, () => { afterEach(() => @@ -402,8 +389,10 @@ function suite(useLegacy = false): void if (useLegacy) { + const spy = jest.spyOn(console, 'warn').mockImplementation(() => { }); expect((instance as any).filters).toBe(null); expect((instance2 as any).filters).toBe(null); + spy.mockRestore(); } else { diff --git a/test/webaudio.test.ts b/test/webaudio.test.ts index 495f4bc..e8d54bf 100644 --- a/test/webaudio.test.ts +++ b/test/webaudio.test.ts @@ -1,3 +1,14 @@ import { suite } from './suite'; +import { filters } from '../src'; suite(false); + +describe(`filters.DistortionFilter`, () => +{ + it('should create a DistortionFilter', () => + { + const filter = new filters.DistortionFilter(0.5); + + expect(filter.amount).toBe(0.5); + }); +}); \ No newline at end of file