-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test flow types are stripped before class properties are transformed * Do not search multiple levels deep * Revert "Do not search multiple levels deep" This reverts commit 5b5324d. * Add missing file for test script to boot * Make sure src and node modules are ignored * Fix error * derp * fix test * Drop unneeded check
- Loading branch information
Showing
7 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
fixtures/smoke/issue-5176-flow-class-properties/index.test.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { bootstrap, isSuccessfulTest } = require('../../utils'); | ||
beforeEach(async () => { | ||
await bootstrap({ directory: global.testDirectory, template: __dirname }); | ||
}); | ||
|
||
describe('issue #5176 (flow class properties interaction)', () => { | ||
it('passes tests', async () => { | ||
await isSuccessfulTest({ | ||
directory: global.testDirectory, | ||
jestEnvironment: 'node', | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
9 changes: 9 additions & 0 deletions
9
fixtures/smoke/issue-5176-flow-class-properties/public/index.html
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>React App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
11 changes: 11 additions & 0 deletions
11
fixtures/smoke/issue-5176-flow-class-properties/src/App.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class App { | ||
constructor() { | ||
this.foo = this.foo.bind(this); | ||
} | ||
foo: void => void; | ||
foo() { | ||
return 'bar'; | ||
} | ||
} | ||
|
||
export default App; |
6 changes: 6 additions & 0 deletions
6
fixtures/smoke/issue-5176-flow-class-properties/src/App.test.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import App from './App'; | ||
|
||
it('creates instance without', () => { | ||
const app = new App(); | ||
expect(app.foo()).toBe('bar'); | ||
}); |
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,5 +1,6 @@ | ||
module.exports = { | ||
testEnvironment: 'node', | ||
testMatch: ['**/*.test.js'], | ||
testPathIgnorePatterns: ['/src/', 'node_modules'], | ||
setupTestFrameworkScriptFile: './setupSmokeTests.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