Skip to content

Commit 0387ee7

Browse files
authored
test: don't use .ts for unknown extension tests (#6649)
**What's the problem this PR addresses?** `.ts` isn't an unknown extension any more after https://github.com/nodejs/node/releases/tag/v23.6.0. **How did you fix it?** Replace `.ts` with `.foo`. **Checklist** - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [x] I have set the packages that need to be released for my changes to be effective. - [x] I will check that all automated PR checks pass before the PR gets reviewed.
1 parent 93a5664 commit 0387ee7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ describe(`Plug'n'Play - ESM`, () => {
326326
{
327327
},
328328
async ({path, run, source}) => {
329-
await xfs.writeFilePromise(ppath.join(path, `index.ts`), `console.log(typeof require === 'undefined')`);
329+
await xfs.writeFilePromise(ppath.join(path, `index.foo`), `console.log(typeof require === 'undefined')`);
330330

331331
await run(`install`);
332332

333-
await expect(run(`node`, `./index.ts`)).resolves.toMatchObject({
333+
await expect(run(`node`, `./index.foo`)).resolves.toMatchObject({
334334
code: 0,
335335
stdout: `false\n`,
336336
});
@@ -345,13 +345,13 @@ describe(`Plug'n'Play - ESM`, () => {
345345
type: `module`,
346346
},
347347
async ({path, run, source}) => {
348-
await xfs.writeFilePromise(ppath.join(path, `index.ts`), ``);
348+
await xfs.writeFilePromise(ppath.join(path, `index.foo`), ``);
349349

350350
await run(`install`);
351351

352-
await expect(run(`node`, `./index.ts`)).rejects.toMatchObject({
352+
await expect(run(`node`, `./index.foo`)).rejects.toMatchObject({
353353
code: 1,
354-
stderr: expect.stringContaining(`Unknown file extension ".ts"`),
354+
stderr: expect.stringContaining(`Unknown file extension ".foo"`),
355355
});
356356
},
357357
),

0 commit comments

Comments
 (0)