Skip to content

Commit

Permalink
pnp test should depend on jsdom
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 10, 2022
1 parent d4260ba commit b48a162
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/verifyPnP.js
Expand Up @@ -34,6 +34,7 @@ try {
{
dependencies: {
jest: '*',
'jest-environment-jsdom': '*',
},
name: 'test-pnp',
},
Expand All @@ -42,7 +43,7 @@ try {
),
);
fs.writeFileSync(
path.join(cwd, 'test.js'),
path.join(cwd, 'jsdom.test.js'),
dedent`
/*
* @jest-environment jsdom
Expand All @@ -53,6 +54,14 @@ try {
});
`,
);
fs.writeFileSync(
path.join(cwd, 'node.test.js'),
dedent`
test('dummy', () => {
expect(typeof window).toBe('undefined');
});
`,
);
execa.sync('yarn', ['link', '--private', '--all', rootDirectory], {
cwd,
stdio: 'inherit',
Expand Down

0 comments on commit b48a162

Please sign in to comment.