Skip to content

Commit 701e285

Browse files
committed
Transform some more tests
1 parent 89f2ae0 commit 701e285

File tree

7 files changed

+895
-644
lines changed

7 files changed

+895
-644
lines changed

test/json.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ local function encode_number(val)
116116
if val ~= val or val <= -math.huge or val >= math.huge then
117117
error("unexpected number value '" .. tostring(val) .. "'")
118118
end
119-
return string.format("%.14g", val)
119+
return string.format("%.17g", val)
120120
end
121121

122122

test/translation/transformation.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const fixtures = fs
1111
.map(f => [path.parse(f).name, fs.readFileSync(path.join(fixturesPath, f), "utf8")]);
1212

1313
test.each(fixtures)("Transformation (%s)", (_name, content) => {
14-
const result = util.transpileString(content, { luaLibImport: tstl.LuaLibImportKind.Require });
15-
expect(result).toMatchSnapshot();
14+
util.testModule(content)
15+
.options({ luaLibImport: tstl.LuaLibImportKind.Require })
16+
.disableSemanticCheck()
17+
.expectLuaToMatchSnapshot();
1618
});

0 commit comments

Comments
 (0)