-
-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
1,178 additions
and
828 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 30 additions & 30 deletions
60
packages/rspack-test-tools/tests/errorCases/error-test-shift.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
/** @type {import('../..').TErrorCaseConfig} */ | ||
module.exports = { | ||
description: "Testing proxy methods on errors: test shift&unshift", | ||
options() { | ||
return { | ||
entry: "./resolve-fail-esm", | ||
plugins: [ | ||
compiler => { | ||
compiler.hooks.afterCompile.tap( | ||
"test shift and unshift", | ||
compilation => { | ||
compilation.errors.shift(); | ||
compilation.errors.unshift("test unshift"); | ||
} | ||
); | ||
} | ||
] | ||
}; | ||
}, | ||
async check(diagnostics) { | ||
expect(diagnostics).toMatchInlineSnapshot(` | ||
Object { | ||
"errors": Array [ | ||
Object { | ||
"formatted": " × test unshift\\n", | ||
"message": " × test unshift\\n", | ||
}, | ||
], | ||
"warnings": Array [], | ||
} | ||
`); | ||
} | ||
description: "Testing proxy methods on errors: test shift&unshift", | ||
options() { | ||
return { | ||
entry: "./resolve-fail-esm", | ||
plugins: [ | ||
compiler => { | ||
compiler.hooks.afterCompile.tap( | ||
"test shift and unshift", | ||
compilation => { | ||
compilation.errors.shift(); | ||
compilation.errors.unshift("test unshift"); | ||
} | ||
); | ||
} | ||
] | ||
}; | ||
}, | ||
async check(diagnostics) { | ||
expect(diagnostics).toMatchInlineSnapshot(` | ||
Object { | ||
"errors": Array [ | ||
Object { | ||
"formatted": " × test unshift\\n", | ||
"message": " × test unshift\\n", | ||
}, | ||
], | ||
"warnings": Array [], | ||
} | ||
`); | ||
} | ||
}; |
52 changes: 26 additions & 26 deletions
52
packages/rspack-test-tools/tests/errorCases/error-test-splice-1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
/** @type {import('../..').TErrorCaseConfig} */ | ||
module.exports = { | ||
description: "Testing proxy methods on errors: test splice 1", | ||
options() { | ||
return { | ||
entry: "./resolve-fail-esm", | ||
plugins: [ | ||
compiler => { | ||
compiler.hooks.afterCompile.tap("test splice", compilation => { | ||
compilation.errors.splice(0, 1, "test splice"); | ||
}); | ||
} | ||
] | ||
}; | ||
}, | ||
async check(diagnostics) { | ||
expect(diagnostics).toMatchInlineSnapshot(` | ||
Object { | ||
"errors": Array [ | ||
Object { | ||
"formatted": " × test splice\\n", | ||
"message": " × test splice\\n", | ||
}, | ||
], | ||
"warnings": Array [], | ||
} | ||
`); | ||
} | ||
description: "Testing proxy methods on errors: test splice 1", | ||
options() { | ||
return { | ||
entry: "./resolve-fail-esm", | ||
plugins: [ | ||
compiler => { | ||
compiler.hooks.afterCompile.tap("test splice", compilation => { | ||
compilation.errors.splice(0, 1, "test splice"); | ||
}); | ||
} | ||
] | ||
}; | ||
}, | ||
async check(diagnostics) { | ||
expect(diagnostics).toMatchInlineSnapshot(` | ||
Object { | ||
"errors": Array [ | ||
Object { | ||
"formatted": " × test splice\\n", | ||
"message": " × test splice\\n", | ||
}, | ||
], | ||
"warnings": Array [], | ||
} | ||
`); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/rspack-test-tools/tests/statsAPICases/child-compiler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
const { createFsFromVolume, Volume } = require("memfs") | ||
let statsJson; | ||
|
||
class TestPlugin { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.