forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapply "Speed up TypeScript v2 (facebook#6406)" (facebook#6586)
This reverts commit b2cf28b and reapplies facebook#6406.
- Loading branch information
Showing
14 changed files
with
220 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Copyright (c) 2015-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
module.exports = ForkTsCheckerWebpackPlugin; |
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
Empty file.
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,33 @@ | ||
const testSetup = require('../__shared__/test-setup'); | ||
const puppeteer = require('puppeteer'); | ||
|
||
const expectedErrorMsg = `Argument of type '123' is not assignable to parameter of type 'string'`; | ||
|
||
test('shows error overlay in browser', async () => { | ||
const { port, done } = await testSetup.scripts.start(); | ||
|
||
const browser = await puppeteer.launch({ headless: true }); | ||
try { | ||
const page = await browser.newPage(); | ||
await page.goto(`http://localhost:${port}/`); | ||
await page.waitForSelector('iframe', { timeout: 5000 }); | ||
const overlayMsg = await page.evaluate(() => { | ||
const overlay = document.querySelector('iframe').contentWindow; | ||
return overlay.document.body.innerHTML; | ||
}); | ||
expect(overlayMsg).toContain(expectedErrorMsg); | ||
} finally { | ||
browser.close(); | ||
done(); | ||
} | ||
}); | ||
|
||
test('shows error in console (dev mode)', async () => { | ||
const { stderr } = await testSetup.scripts.start({ smoke: true }); | ||
expect(stderr).toContain(expectedErrorMsg); | ||
}); | ||
|
||
test('shows error in console (prod mode)', async () => { | ||
const { stderr } = await testSetup.scripts.build(); | ||
expect(stderr).toContain(expectedErrorMsg); | ||
}); |
Oops, something went wrong.