-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
jsfmt.spec.js.snap
51 lines (44 loc) · 1.24 KB
/
jsfmt.spec.js.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
exports[`test A.js 1`] = `
"/* @flow */
var m1 = require(\'1DoesntExist\');
import {numVal as numVal1} from \'1DoesntExist\';
var a_1: number = m1.numVal;
var a_2: number = numVal1;
// 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.
var m2 = require(\'2DoesntExist\'); // Error
import {numVal as numVal2} from \'3DoesntExist\'; // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @flow */
var m1 = require(\"1DoesntExist\");
import { numVal as numVal1 } from \"1DoesntExist\";
var a_1: number = m1.numVal;
var a_2: number = numVal1;
// 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.
var m2 = require(\"2DoesntExist\"); // Error
import { numVal as numVal2 } from \"3DoesntExist\"; // Error
"
`;
exports[`test Exists.js 1`] = `
"/**
* @providesModule Exists
* @flow
*/
module.exports = {
numVal: 42
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* @providesModule Exists
* @flow
*/
module.exports = {
numVal: 42
};
"
`;