๐Ÿ“ฆ oven-sh / bun

๐Ÿ“„ number-literal-bug.js ยท 12 lines
1
2
3
4
5
6
7
8
9
10
11
12// test that we don't call functions on number literals
export function test() {
  const precision = 10;
  try {
    parseFloat((0.0).toPrecision(precision) + "1");
  } catch (exception) {
    throw new Error("Test Failed", exception);
  }

  testDone(import.meta.url);
}