Skip to content

Commit cf51873

Browse files
committed
Update runtime tests
1 parent 4a36f84 commit cf51873

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Tests/BridgeJSRuntimeTests/ExportAPITests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ struct TestError: Error {
153153
case ok = 200
154154
case notFound = 404
155155
case serverError = 500
156+
case unknown = -1
156157
}
157158

158159
@JS(enumStyle: .tsEnum) enum TSDirection {

Tests/BridgeJSRuntimeTests/Generated/JavaScript/BridgeJS.ExportSwift.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,13 @@
12901290
],
12911291
"name" : "serverError",
12921292
"rawValue" : "500"
1293+
},
1294+
{
1295+
"associatedValues" : [
1296+
1297+
],
1298+
"name" : "unknown",
1299+
"rawValue" : "-1"
12931300
}
12941301
],
12951302
"emitStyle" : "const",

Tests/prelude.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ function BridgeJSRuntimeTests_runJsWorks(instance, exports) {
401401
assert.equal(exports.HttpStatus.Ok, 200);
402402
assert.equal(exports.HttpStatus.NotFound, 404);
403403
assert.equal(HttpStatusValues.ServerError, 500);
404+
assert.equal(HttpStatusValues.Unknown, -1);
404405

405406
assert.equal(exports.setTheme(exports.Theme.Light), exports.Theme.Light);
406407
assert.equal(exports.setTheme(exports.Theme.Dark), exports.Theme.Dark);

0 commit comments

Comments
 (0)