diff --git a/config/templates/workflows/tests.plugin.yml b/config/templates/workflows/tests.plugin.yml index e9ee88660aa..0364b05fa52 100644 --- a/config/templates/workflows/tests.plugin.yml +++ b/config/templates/workflows/tests.plugin.yml @@ -37,7 +37,7 @@ jobs: env: CI: true - name: Install peer & test dependencies - run: "cd packages/{{ plugin }} && npm install {{{ peerdeps }}} mocha chai" + run: "cd packages/{{ plugin }} && npm install {{{ peerdeps }}} {{{ devdeps }}}" env: CI: true - name: Build plugin diff --git a/scripts/reconfigure.js b/scripts/reconfigure.js index 43f6bd8dc38..06d13ea3084 100644 --- a/scripts/reconfigure.js +++ b/scripts/reconfigure.js @@ -462,6 +462,7 @@ function configurePkgUnitTests(type, pkg, config) { const source = path.join(config.repoPath, 'config', 'templates', 'tests', `${type}s`) // Write templates const peerdeps = peerDependencies(pkg, config, type) + const devdeps = devDependencies(pkg, config, type) const replace = (type === 'pattern') ? { version, @@ -472,9 +473,15 @@ function configurePkgUnitTests(type, pkg, config) { .join(' ') } : { - version, - plugin: pkg, - Plugin: capitalize(pkg), + version, + plugin: pkg, + Plugin: capitalize(pkg), + peerdeps: Object.keys(peerdeps) + .map((dep) => dep + '@' + peerdeps[dep]) + .join(' '), + devdeps: Object.keys(devdeps) + .map((dep) => dep + '@' + devdeps[dep]) + .join(' ') } for (const file of ['shared.test.mjs']) {