diff --git a/commands/create/__tests__/__snapshots__/create-command.test.js.snap b/commands/create/__tests__/__snapshots__/create-command.test.js.snap index 6b953d87f15..7fa6e371c21 100644 --- a/commands/create/__tests__/__snapshots__/create-command.test.js.snap +++ b/commands/create/__tests__/__snapshots__/create-command.test.js.snap @@ -43,7 +43,7 @@ index SHA..SHA +'use strict'; + +const myCli = require('..'); -+const assert = require('node:assert').strict; ++const assert = require('assert').strict; + +assert.strictEqual(myCli(), 'Hello from myCli'); +console.info("myCli tests passed"); @@ -185,7 +185,7 @@ index SHA..SHA +++ b/packages/my-es-cli/__tests__/my-es-cli.test.js @@ -0,0 +1,5 @@ +import myEsCli from '../src/my-es-cli.js'; -+import { strict as assert } from 'node:assert'; ++import { strict as assert } from 'assert'; + +assert.strictEqual(myEsCli(), 'Hello from myEsCli'); +console.info("myEsCli tests passed"); @@ -311,7 +311,7 @@ index SHA..SHA +'use strict'; + +const myPkg = require('..'); -+const assert = require('node:assert').strict; ++const assert = require('assert').strict; + +assert.strictEqual(myPkg(), 'Hello from myPkg'); +console.info("myPkg tests passed"); @@ -388,7 +388,7 @@ index SHA..SHA +++ b/packages/my-pkg/__tests__/my-pkg.test.js @@ -0,0 +1,5 @@ +import myPkg from '../src/my-pkg.js'; -+import { strict as assert } from 'node:assert'; ++import { strict as assert } from 'assert'; + +assert.strictEqual(myPkg(), 'Hello from myPkg'); +console.info("myPkg tests passed"); diff --git a/commands/create/index.js b/commands/create/index.js index 1ac054b5af3..ece42d46a3d 100644 --- a/commands/create/index.js +++ b/commands/create/index.js @@ -419,7 +419,7 @@ class CreateCommand extends Command { const testContent = this.options.esModule ? dedent` import ${this.camelName} from '../src/${this.dirName}.js'; - import { strict as assert } from 'node:assert'; + import { strict as assert } from 'assert'; assert.strictEqual(${this.camelName}(), 'Hello from ${this.camelName}'); console.info("${this.camelName} tests passed"); @@ -428,7 +428,7 @@ class CreateCommand extends Command { 'use strict'; const ${this.camelName} = require('..'); - const assert = require('node:assert').strict; + const assert = require('assert').strict; assert.strictEqual(${this.camelName}(), 'Hello from ${this.camelName}'); console.info("${this.camelName} tests passed");