Skip to content

Commit

Permalink
test: Add test for fixed jsx-source warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Apr 26, 2024
1 parent 61ce7a4 commit d4ff12e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions debug/test/browser/component-stack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,19 @@ describe('component stack', () => {
expect(lines[1].indexOf('Thrower') > -1).to.equal(true);
expect(lines[2].indexOf('Bar') > -1).to.equal(true);
});

it('should not print a warning when "@babel/plugin-transform-react-jsx-source" is installed', () => {
function Thrower() {
throw 'foo';
return <div>foo</div>;

Check failure on line 90 in debug/test/browser/component-stack.test.js

View workflow job for this annotation

GitHub Actions / Build & Test

Unreachable code

Check failure on line 90 in debug/test/browser/component-stack.test.js

View workflow job for this annotation

GitHub Actions / Build & Test / Build & Test

Unreachable code
}

try {
render(<Thrower />, scratch);
} catch {}

expect(warnings.join(' ')).to.not.include(
'@babel/plugin-transform-react-jsx-source'
);
});
});

0 comments on commit d4ff12e

Please sign in to comment.