-
Notifications
You must be signed in to change notification settings - Fork 473
Expand file tree
/
Copy pathpath-mapping.spec.ts.snap
More file actions
65 lines (60 loc) · 2.42 KB
/
path-mapping.spec.ts.snap
File metadata and controls
65 lines (60 loc) · 2.42 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`path-mapping should replace alias path with relative path which is resolved from paths tsconfig with custom extensions 1`] = `
"import styles from \\"../../../utils/json.css\\";
console.log(styles);
"
`;
exports[`path-mapping should replace alias path with relative path which is resolved from paths tsconfig with custom extensions 2`] = `
"import jsonData from \\"../../../utils/json.json\\";
console.log(jsonData);
"
`;
exports[`path-mapping should replace alias path with relative path which is resolved from paths tsconfig with custom extensions 3`] = `
"import vueComponent from \\"../../../utils/json.vue\\";
console.log(vueComponent);
"
`;
exports[`path-mapping should replace alias path with relative path which is resolved from paths tsconfig with js/ts extension 1`] = `
"\\"use strict\\";
Object.defineProperty(exports, \\"__esModule\\", { value: true });
exports.jsonUtils = void 0;
var json_1 = require(\\"./src/utils/json.ts\\");
var json_2 = require(\\"./src/utils/json.ts\\");
var json = require(\\"./src/utils/json.ts\\");
exports.jsonUtils = require(\\"./src/utils/json.ts\\");
var stringify = require(\\"./src/utils/json.ts\\").stringify;
var foo = require(\\"./src/utils/json.ts\\");
Promise.resolve().then(function () { return require(\\"./src/utils/json.ts\\"); }).then(function (module) {
module.parse('{foo:1}');
});
var json_3 = require(\\"./src/utils/json.ts\\");
stringify({ foo: 1 });
(0, json_1.parse)('{foo:1}');
console.log(json);
console.log(foo);
var bar = { foo: 2 };
json_2.default.foo(1);
"
`;
exports[`path-mapping should replace alias path with relative path which is resolved from paths tsconfig with js/ts extension 2`] = `
"\\"use strict\\";
Object.defineProperty(exports, \\"__esModule\\", { value: true });
exports.jsonUtils = void 0;
var json_1 = require(\\"./src/utils/json.ts\\");
var json_2 = require(\\"./src/utils/json.ts\\");
var json = require(\\"./src/utils/json.ts\\");
exports.jsonUtils = require(\\"./src/utils/json.ts\\");
var stringify = require(\\"./src/utils/json.ts\\").stringify;
var foo = require(\\"./src/utils/json.ts\\");
Promise.resolve().then(function () { return require(\\"./src/utils/json.ts\\"); }).then(function (module) {
module.parse('{foo:1}');
});
var json_3 = require(\\"./src/utils/json.ts\\");
stringify({ foo: 1 });
(0, json_1.parse)('{foo:1}');
console.log(json);
console.log(foo);
var bar = { foo: 2 };
json_2.default.foo(1);
"
`;