Summary: Setting the module extension to .tsx overrode the defaults, meaning .js files were no longer being checked when imported. This adds the defaults back to the extensions to be checked, including `.js` It does seem to cause errors importing `.tsx` at the moment, but there aren't many so I've just $FlowFixMe'd them for now. https://flow.org/en/docs/config/options/#toc-module-file-ext-string Reviewed By: passy Differential Revision: D16333800 fbshipit-source-id: 7bea92c038048234b4f634704f71c15d79ab3c63
26 lines
550 B
JavaScript
26 lines
550 B
JavaScript
/**
|
|
* Copyright 2018-present Facebook.
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
* @format
|
|
*/
|
|
|
|
import {Idler} from '../Idler';
|
|
|
|
test('Idler should interrupt', async () => {
|
|
const idler = new Idler();
|
|
let i = 0;
|
|
try {
|
|
for (; i < 500; i++) {
|
|
if (i == 100) {
|
|
idler.cancel();
|
|
}
|
|
await idler.idle();
|
|
}
|
|
// $FlowFixMe T47375728
|
|
fail('Idler should have thrown an error');
|
|
} catch (e) {
|
|
expect(i).toEqual(100);
|
|
}
|
|
});
|