From 36ac3e090f35a49e239312be5537b2b3b311a305 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Mon, 11 Dec 2023 15:53:16 -0800 Subject: [PATCH] address feedback --- src/webgpu/idl/constructable.spec.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/webgpu/idl/constructable.spec.ts b/src/webgpu/idl/constructable.spec.ts index fc9b2bf3387c..8fd9d08d3c81 100644 --- a/src/webgpu/idl/constructable.spec.ts +++ b/src/webgpu/idl/constructable.spec.ts @@ -2,25 +2,23 @@ export const description = ` Test that constructable WebGPU objects are actually constructable. `; -import { keysOf } from '../../common/util/data_tables.js'; - import { makeTestGroup } from './../../common/framework/test_group.js'; import { IDLTest } from './idl_test.js'; export const g = makeTestGroup(IDLTest); -const errors = { - GPUInternalError: globalThis.GPUInternalError, - GPUOutOfMemoryError: globalThis.GPUOutOfMemoryError, - GPUValidationError: globalThis.GPUValidationError, -}; - g.test('gpu_errors') .desc('tests that GPUErrors are constructable') - .params(u => u.combine('errorType', keysOf(errors))) + .params(u => + u.combine('errorType', [ + 'GPUInternalError', + 'GPUOutOfMemoryError', + 'GPUValidationError', + ] as const) + ) .fn(t => { const { errorType } = t.params; - const Ctor = errors[errorType]; + const Ctor = globalThis[errorType]; const msg = 'this is a test'; const error = new Ctor(msg); t.expect(error.message === msg);