This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge chakra-core/ChakraCore@4f6b659a41] [MERGE #3857 @jackhorton] F…
…ix issue with calling JSON.stringify on an object with internal properties Merge pull request #3857 from jackhorton:stringify-internal-props
- Loading branch information
Showing
2 changed files
with
31 additions
and
4 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
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,20 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// Copyright (C) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
|
||
if (this.WScript && this.WScript.LoadScriptFile) { // Check for running in ch | ||
this.WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js"); | ||
} | ||
|
||
const tests = [ | ||
{ | ||
name: "Stringify error", | ||
body: function () { | ||
const err = new Error("message"); | ||
assert.areEqual('{"description":"message","message":"message"}', JSON.stringify(err)); | ||
} | ||
} | ||
]; | ||
|
||
testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" }); |