Skip to content

Commit 0335506

Browse files
committed
Fix JavaScript tests
1 parent d3cb170 commit 0335506

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

tests/wasm/__snapshots__/tests.test.mjs.snap

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const tr_ch_apm$up_constructor = tr_ch_apm_tracingChannel("orchestrion:one:up:co
88
module.exports = class Up {
99
constructor(){
1010
const tr_ch_apm_ctx$up_constructor = {
11-
arguments
11+
arguments,
12+
module_version: "1.0.0"
1213
};
1314
try {
1415
if (tr_ch_apm$up_constructor.hasSubscribers) {
@@ -42,7 +43,8 @@ module.exports = class Up {
4243
if (!tr_ch_apm$up_fetch.hasSubscribers) return __apm$traced();
4344
return tr_ch_apm$up_fetch.traceSync(__apm$traced, {
4445
arguments,
45-
self: this
46+
self: this,
47+
module_version: "1.0.0"
4648
});
4749
}
4850
};
@@ -59,7 +61,8 @@ const tr_ch_apm$up_constructor = tr_ch_apm_tracingChannel("orchestrion:one:up:co
5961
export class Up {
6062
constructor(){
6163
const tr_ch_apm_ctx$up_constructor = {
62-
arguments
64+
arguments,
65+
module_version: "1.0.0"
6366
};
6467
try {
6568
if (tr_ch_apm$up_constructor.hasSubscribers) {
@@ -93,7 +96,8 @@ export class Up {
9396
if (!tr_ch_apm$up_fetch.hasSubscribers) return __apm$traced();
9497
return tr_ch_apm$up_fetch.traceSync(__apm$traced, {
9598
arguments,
96-
self: this
99+
self: this,
100+
module_version: "1.0.0"
97101
});
98102
}
99103
}
@@ -110,7 +114,8 @@ const tr_ch_apm$up_constructor = tr_ch_apm_tracingChannel("orchestrion:one:up:co
110114
export class Up {
111115
constructor(){
112116
const tr_ch_apm_ctx$up_constructor = {
113-
arguments
117+
arguments,
118+
module_version: "1.0.0"
114119
};
115120
try {
116121
if (tr_ch_apm$up_constructor.hasSubscribers) {
@@ -144,11 +149,12 @@ export class Up {
144149
if (!tr_ch_apm$up_fetch.hasSubscribers) return __apm$traced();
145150
return tr_ch_apm$up_fetch.traceSync(__apm$traced, {
146151
arguments,
147-
self: this
152+
self: this,
153+
module_version: "1.0.0"
148154
});
149155
}
150156
}
151157
",
152-
"map": "{"version":3,"file":"module.js","sources":["module.ts"],"sourceRoot":"","names":[],"mappings":";;;AAEA,MAAM,CAAA,MAAO,EAAE;IACX,aAAA;;;;;;;;YACI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;;;;;;;;;;;;;;;;IAC/B,CAAC;IACD,KAAK,IAAS,EAAA;;;mCAAR;gBACF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;;;;;;;;;IACzB,CAAC;CACJ"}",
158+
"map": "{"version":3,"file":"module.js","sources":["module.ts"],"sourceRoot":"","names":[],"mappings":";;;AAEA,MAAM,CAAA,MAAO,EAAE;IACX,aAAA;;;;;;;;;YACI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;;;;;;;;;;;;;;;;IAC/B,CAAC;IACD,KAAK,IAAS,EAAA;;;mCAAR;gBACF,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;;;;;;;;;;IACzB,CAAC;CACJ"}",
153159
}
154160
`;

tests/wasm/tests.test.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ export class Up {
8282
}
8383
});
8484

85-
console.log({ outputJavaScript });
86-
8785
const outputTs = matchedTransforms.transform(
8886
outputJavaScript,
8987
"esm",
@@ -92,12 +90,11 @@ export class Up {
9290

9391
expect(outputTs).toMatchSnapshot();
9492

95-
9693
const sourceMapConsumer = (await new SourceMapConsumer(JSON.parse(outputTs.map)));
9794

9895
const originalPosition = sourceMapConsumer.originalPositionFor({
9996
// This is the position of the fetch function in the transformed JavaScript
100-
line: 30,
97+
line: 31,
10198
column: 4,
10299
});
103100

0 commit comments

Comments
 (0)