Skip to content

Commit

Permalink
test: don't use .ts for unknown extension tests (#6649)
Browse files Browse the repository at this point in the history
**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.
  • Loading branch information
merceyz authored Feb 3, 2025
1 parent 93a5664 commit 0387ee7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ describe(`Plug'n'Play - ESM`, () => {
{
},
async ({path, run, source}) => {
await xfs.writeFilePromise(ppath.join(path, `index.ts`), `console.log(typeof require === 'undefined')`);
await xfs.writeFilePromise(ppath.join(path, `index.foo`), `console.log(typeof require === 'undefined')`);

await run(`install`);

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

await run(`install`);

await expect(run(`node`, `./index.ts`)).rejects.toMatchObject({
await expect(run(`node`, `./index.foo`)).rejects.toMatchObject({
code: 1,
stderr: expect.stringContaining(`Unknown file extension ".ts"`),
stderr: expect.stringContaining(`Unknown file extension ".foo"`),
});
},
),
Expand Down

0 comments on commit 0387ee7

Please sign in to comment.