From 47ddfddca72cd8e407d9d25009f8aa4bc2b69e6d Mon Sep 17 00:00:00 2001 From: Gustavo Perdomo Date: Mon, 2 Dec 2024 00:07:46 -0300 Subject: [PATCH] feat(nx-plugin): improved tests --- .../src/generators/plugin/plugin.spec.ts | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/plugin/src/generators/plugin/plugin.spec.ts b/packages/plugin/src/generators/plugin/plugin.spec.ts index 63a9e2b75fd37f..6b36c8b1831eb8 100644 --- a/packages/plugin/src/generators/plugin/plugin.spec.ts +++ b/packages/plugin/src/generators/plugin/plugin.spec.ts @@ -196,9 +196,13 @@ describe('NxPlugin Plugin Generator', () => { expect(tree.exists(path)).toBeTruthy() ); - expect( - readProjectConfiguration(tree, 'my-plugin').targets.test - ).toBeDefined(); + const projectTargets = readProjectConfiguration( + tree, + 'my-plugin' + ).targets; + + expect(projectTargets.test).toBeDefined(); + expect(projectTargets.test?.executor).toEqual('@nx/jest:jest'); }); }); @@ -216,9 +220,13 @@ describe('NxPlugin Plugin Generator', () => { expect(tree.exists(path)).toBeTruthy() ); - expect( - readProjectConfiguration(tree, 'my-plugin').targets.test - ).toBeDefined(); + const projectTargets = readProjectConfiguration( + tree, + 'my-plugin' + ).targets; + + expect(projectTargets.test).toBeDefined(); + expect(projectTargets.test?.executor).toEqual('@nx/vite:test'); }); }); });