2016-12-23 22:31:38 +03:00
|
|
|
exports[`test A.js 1`] = `
|
|
|
|
"/* @flow */
|
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var m1 = require(\'1DoesntExist\');
|
|
|
|
import {numVal as numVal1} from \'1DoesntExist\';
|
2016-12-23 22:31:38 +03:00
|
|
|
var a_1: number = m1.numVal;
|
|
|
|
var a_2: number = numVal1;
|
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
// Error: \'Exists2\' is not a valid module name
|
2016-12-23 22:31:38 +03:00
|
|
|
//
|
|
|
|
// This tests that, for haste, the first name_mapper regexp that happens to
|
|
|
|
// match the given module name string is picked.
|
2016-12-30 19:56:42 +03:00
|
|
|
var m2 = require(\'2DoesntExist\'); // Error
|
|
|
|
import {numVal as numVal2} from \'3DoesntExist\'; // Error
|
2016-12-23 22:31:38 +03:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/* @flow */
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2016-12-30 19:56:42 +03:00
|
|
|
var m1 = require(\"1DoesntExist\");
|
2017-01-11 03:32:35 +03:00
|
|
|
import { numVal as numVal1 } from \"1DoesntExist\";
|
2016-12-27 21:29:31 +03:00
|
|
|
var a_1: number = m1.numVal;
|
|
|
|
var a_2: number = numVal1;
|
2017-01-10 05:49:06 +03:00
|
|
|
|
|
|
|
// Error: \'Exists2\' is not a valid module name
|
|
|
|
//
|
|
|
|
// This tests that, for haste, the first name_mapper regexp that happens to
|
|
|
|
// match the given module name string is picked.
|
2017-01-26 22:57:43 +03:00
|
|
|
var m2 = require(\"2DoesntExist\"); // Error
|
2017-01-11 18:16:38 +03:00
|
|
|
import { numVal as numVal2 } from \"3DoesntExist\"; // Error
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`test Exists.js 1`] = `
|
|
|
|
"/**
|
|
|
|
* @providesModule Exists
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
numVal: 42
|
|
|
|
};
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
/**
|
|
|
|
* @providesModule Exists
|
|
|
|
* @flow
|
|
|
|
*/
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2017-01-11 18:16:38 +03:00
|
|
|
module.exports = { numVal: 42 };
|
|
|
|
"
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|