You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/plugin-tests.js
+11-4
Original file line number
Diff line number
Diff line change
@@ -2887,17 +2887,24 @@ let syncTests = {
2887
2887
assert.strictEqual(e.message.split('\n')[0],'Build failed with 1 error:')
2888
2888
assert.strictEqual(e.errors[0].text,
2889
2889
'Detected inconsistent metadata for the path "scripts/.plugin-tests/testNonDeterministicBuild/src/c.js" when it was imported here:')
2890
-
assert.strictEqual(e.errors[0].notes.map(x=>x.text).join('\n'),`The original metadata for that path comes from when it was imported here:
2890
+
2891
+
constexpectedError=sideEffects=>`The original metadata for that path comes from when it was imported here:
2891
2892
The difference in metadata is displayed below:
2892
2893
2893
2894
{
2894
-
- "sideEffects": true,
2895
-
+ "sideEffects": false,
2895
+
- "sideEffects": ${!sideEffects},
2896
+
+ "sideEffects": ${sideEffects},
2896
2897
}
2897
2898
2898
2899
This is a bug in the "some-plugin" plugin. Plugins provide metadata for a given path in an "onResolve" callback. \
2899
2900
All metadata provided for the same path must be consistent to ensure deterministic builds. Due to parallelism, \
2900
-
one set of provided metadata will be randomly chosen for a given path, so providing inconsistent metadata for the same path can cause non-determinism.`)
2901
+
one set of provided metadata will be randomly chosen for a given path, so providing inconsistent metadata for the same path can cause non-determinism.`
2902
+
2903
+
// Try both orders to avoid flakes (since this test is deliberately non-deterministic)
0 commit comments