diff --git a/test/easy-ast.spec.ts b/test/easy-ast.spec.ts index 345f5453..26a43468 100644 --- a/test/easy-ast.spec.ts +++ b/test/easy-ast.spec.ts @@ -19,16 +19,15 @@ import {expect} from 'chai'; import {omitBy} from 'lodash'; describe('Easy AST', async () => { + const project = lightweightProjectFromPath('./test/easy-ast', true); for (const file of expandPathToFilesSync('./test/easy-ast', file => file.endsWith('ast-test.ts'))) { try { const test = (await import(file))['testConfig'] as EasyAstSpecType; it(test.testName, () => { - const project = omitBy(lightweightProjectFromPath(file, true)[toUnixPath(file)], (_value, key) => - key.startsWith('$'), + expect(omitBy(project[toUnixPath(file)], (_value, key) => key.startsWith('$'))).to.be.deep.equal( + test.expected, ); - - expect(project).to.be.deep.equal(test.expected); }); } catch (error) { console.error(error);