Skip to content

Commit

Permalink
Skip warning check that fails release tests (#15657)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 26, 2023
1 parent 92e31fc commit 19e89e7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"_": "The warning is only shown once in the release build, tested by the assertions-with-to-default fixture",
"noWarnInPublishBuild": true,
"plugins": [["importAttributes", { "deprecatedAssertSyntax": true }]],
"warns": "You are using import attributes, without specifying the desired output syntax.",
"expectedReParseError": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"_": "The warning is only shown once in the release build, tested by the assertions-with-to-default fixture",
"noWarnInPublishBuild": true,
"plugins": ["importAttributes"],
"warns": "You are using import attributes, without specifying the desired output syntax.",
"expectedReParseError": true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"_": "The warning is only shown once in the release build, tested by the assertions-with-to-default fixture",
"noWarnInPublishBuild": true,
"plugins": [["moduleAttributes", { "version": "may-2020" }]],
"warns": "You are using import attributes, without specifying the desired output syntax.",
"BABEL_8_BREAKING": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"plugins": [
["moduleAttributes", { "version": "may-2020" }]
],
"_": "The warning is only shown once in the release build, tested by the assertions-with-to-default fixture",
"noWarnInPublishBuild": true,
"plugins": [["moduleAttributes", { "version": "may-2020" }]],
"sourceType": "module",
"warns": "You are using import attributes, without specifying the desired output syntax.",
"BABEL_8_BREAKING": false
Expand Down
5 changes: 4 additions & 1 deletion packages/babel-generator/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,10 @@ suites.forEach(function (testSuite) {

const result = run();

if (options.warns) {
if (
options.warns &&
(!process.env.IS_PUBLISH || !options.noWarnInPublishBuild)
) {
expect(console.warn).toHaveBeenCalledWith(
expect.stringContaining(options.warns),
);
Expand Down

0 comments on commit 19e89e7

Please sign in to comment.