Files
react-native-devtools-frontend/test/e2e/resources/console/primitives.html
T
Mathias Bynens 0a48503ad6 Simplify test resources
Test resources should act as minimal repro cases: they should be as
small and simple as possible, without any unnecessary code that
distracts from what’s important.

This patch applies that thinking to the existing test resources, with
only a few exceptions for 1) descriptive <title>s and 2) the mandatory
license headers.

This came up during review of [1].

[1]: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107525

Change-Id: I1081bb06129d2b6ce98daf1349d20b2bf2fd9401
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116445
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-03-24 12:55:22 +00:00

41 lines
1.0 KiB
HTML

<!--
Copyright 2020 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<script type="module">
console.log(null);
console.log(undefined);
console.log(NaN);
console.log({});
console.log([function() {}]);
console.log(Number.POSITIVE_INFINITY);
console.log(Number.NEGATIVE_INFINITY);
console.log(new Number(42));
console.log(new String('abc'));
const num = 1.2e-1;
console.log(num);
const negZero = 1 / Number.NEGATIVE_INFINITY;
console.log(negZero);
const string = 'test';
console.log(string);
const linkify = 'https://chromium.org';
console.log(linkify);
const boxedNumberWithProps = new Number(42);
boxedNumberWithProps[1] = 'foo';
boxedNumberWithProps['a'] = 'bar';
console.log(boxedNumberWithProps);
const boxedStringWithProps = new String('abc');
boxedStringWithProps['01'] = 'foo';
boxedStringWithProps[3] = 'foo';
boxedStringWithProps['a'] = 'bar';
console.log(boxedStringWithProps);
</script>