Skip to content

Commit 15943ef

Browse files
authored
test: resolve a few issues with tests causing inconsistent results (#5992)
* test: correct the usage of runInstallFixture helper * test: use serial when calling getPort
1 parent 8b7fca6 commit 15943ef

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

packages/build/tests/install/snapshots/tests.js.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,7 @@ Generated by [AVA](https://avajs.dev).
673673
repositoryRoot: packages/build/tests/install/fixtures/yarn␊
674674
testOpts:␊
675675
pluginsListUrl: test␊
676-
silentLingeringProcesses: true␊
677-
useBinary: true␊
676+
silentLingeringProcesses: 'true'␊
678677
679678
> Current directory␊
680679
packages/build/tests/install/fixtures/yarn␊
@@ -730,13 +729,11 @@ Generated by [AVA](https://avajs.dev).
730729
731730
> Flags␊
732731
debug: true␊
733-
flags:␊
734-
mode: buildbot␊
732+
mode: buildbot␊
735733
repositoryRoot: packages/build/tests/install/fixtures/yarn_ci␊
736734
testOpts:␊
737735
pluginsListUrl: test␊
738-
silentLingeringProcesses: true␊
739-
useBinary: true␊
736+
silentLingeringProcesses: 'true'␊
740737
741738
> Current directory␊
742739
packages/build/tests/install/fixtures/yarn_ci␊
-20 Bytes
Binary file not shown.

packages/build/tests/install/tests.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,18 @@ test('Install local plugin dependencies: with npm', async (t) => {
112112
})
113113

114114
test('Install local plugin dependencies: with yarn locally', async (t) => {
115-
await runInstallFixture(t, 'yarn', [`${FIXTURES_DIR}/yarn/plugin/node_modules/`], { useBinary: true })
115+
await runInstallFixture(t, 'yarn', [`${FIXTURES_DIR}/yarn/plugin/node_modules/`], {}, true, true)
116116
})
117117

118118
test('Install local plugin dependencies: with yarn in CI', async (t) => {
119-
await runInstallFixture(t, 'yarn_ci', [`${FIXTURES_DIR}/yarn_ci/plugin/node_modules/`], {
120-
useBinary: true,
121-
flags: { mode: 'buildbot' },
122-
})
119+
await runInstallFixture(
120+
t,
121+
'yarn_ci',
122+
[`${FIXTURES_DIR}/yarn_ci/plugin/node_modules/`],
123+
{ mode: 'buildbot' },
124+
true,
125+
true,
126+
)
123127
})
124128

125129
test('Install local plugin dependencies: propagate errors', async (t) => {

packages/build/tests/plugins/tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ test('Plugin errors that occur during the loading phase are piped to system logs
368368
t.snapshot(normalizeOutput(output))
369369
})
370370

371-
test('Plugins have a pre-populated Blobs context', async (t) => {
371+
test.serial('Plugins have a pre-populated Blobs context', async (t) => {
372372
const serverPort = await getPort()
373373
const deployId = 'deploy123'
374374
const siteId = 'site321'

0 commit comments

Comments
 (0)