Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improve placement of $FlowExpectedErrors in @babel/* packages #4559

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import '@babel/polyfill';
// This should fail but couldn't make it to do so
import defaultValue from '@babel/polyfill';

// $FlowExpectedError does not export anything
// $FlowExpectedError[missing-export] does not export anything
import { namedExport } from '@babel/polyfill';
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import '@babel/polyfill';
// This should fail but couldn't make it to do so
import defaultValue from '@babel/polyfill';

// $FlowExpectedError does not export anything
// $FlowExpectedError[missing-export] does not export anything
import { namedExport } from '@babel/polyfill';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, it } from 'flow-typed-test';

describe('unknown properties', () => {
it('are not allowed', () => {
// $FlowExpectedError does not accept unknown props
// $FlowExpectedError[prop-missing] does not accept unknown props
require('@babel/register')({
unknown: 'property'
});
Expand All @@ -20,14 +20,12 @@ describe('plugins', () => {
});
});
it('does not accept anything else', () => {
// $FlowExpectedError no numbers
require('@babel/register')({
plugins: [
123
]
// $FlowExpectedError[incompatible-call] no numbers
plugins: [123]
});
// $FlowExpectedError should be array
require('@babel/register')({
// $FlowExpectedError[incompatible-call] should be array
plugins: 'my-plugin'
});
})
Expand Down
Loading