prettier/tests/flow/config_module_name_rewrite_.../__snapshots__/jsfmt.spec.js.snap

52 lines
1.2 KiB
Plaintext
Raw Normal View History

exports[`test A.js 1`] = `
"/* @flow */
2016-12-30 19:56:42 +03:00
var m1 = require(\'1DoesntExist\');
import {numVal as numVal1} from \'1DoesntExist\';
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
//
// 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/* @flow */
2016-12-30 19:56:42 +03:00
var m1 = require(\"1DoesntExist\");
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;
// 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
2017-01-11 18:16:38 +03:00
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
};
2017-01-11 18:16:38 +03:00
"
`;