-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor console.log implementation a bit (#1741)
- Loading branch information
Showing
6 changed files
with
75 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
test-app/app/src/main/assets/app/tests/console/logTests.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
describe("Test JSONObject conversions", () => { | ||
it("console.log with number param should not crash", () => { | ||
console.log(123); | ||
}); | ||
|
||
it("console.log with string param should not crash", () => { | ||
console.log("123"); | ||
}); | ||
|
||
it("console.log with object param should not crash", () => { | ||
console.log({ num: 123 }); | ||
}); | ||
|
||
it("console.log with function param should not crash", () => { | ||
console.log(function() {}); | ||
}); | ||
|
||
it("console.log with arrow function param should not crash", () => { | ||
console.log(() => {}); | ||
}); | ||
|
||
it("console.log with primitive array param should not crash", () => { | ||
console.log([1, 2, 3]); | ||
}); | ||
|
||
it("console.log with object array param should not crash", () => { | ||
console.log([{ | ||
num: 123 | ||
}]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters