MCPcopy Index your code
hub / github.com/nodejs/node / assertIsRawJson

Function assertIsRawJson

deps/v8/test/mjsunit/harmony/json-parse-with-source.js:244–250  ·  view source on GitHub ↗
(rawJson, expectedRawJsonValue)

Source from the content-addressed store, hash-verified

242})();
243
244function assertIsRawJson(rawJson, expectedRawJsonValue) {
245 assertEquals(null, Object.getPrototypeOf(rawJson));
246 assertTrue(Object.hasOwn(rawJson, 'rawJSON'));
247 assertEquals(['rawJSON'], Object.getOwnPropertyNames(rawJson));
248 assertEquals([], Object.getOwnPropertySymbols(rawJson));
249 assertEquals(expectedRawJsonValue, rawJson.rawJSON);
250}
251
252(function TestRawJson() {
253 assertIsRawJson(JSON.rawJSON(1), '1');

Callers 1

Calls 2

assertEqualsFunction · 0.50
assertTrueFunction · 0.50

Tested by

no test coverage detected