diff --git a/packages/engine/__tests__/index.test.ts b/packages/engine/__tests__/index.test.ts index 91b39c1..90f2d07 100644 --- a/packages/engine/__tests__/index.test.ts +++ b/packages/engine/__tests__/index.test.ts @@ -3,6 +3,7 @@ import Engine from '../src'; import path from 'path'; import { AssertionError } from 'assert'; import { get } from 'lodash'; +import { DevsError } from '@serverless-devs/utils'; test('指定 template 不存在', async () => { const engine = new Engine({ @@ -330,7 +331,7 @@ test('validate projectName', async () => { }); const context = await engine.start(); console.log(context); - expect(get(context, 'error[0]')).toBeInstanceOf(AssertionError); + expect(get(context, 'error[0]')).toBeInstanceOf(DevsError); expect(get(context, 'error[0].message')).toBe(`The name of the project [deploy] overlaps with a command, please change it's name`); expect(get(context, 'error[0].code')).toBe('ERR_ASSERTION'); });