File Explorer

/var/runtime/node_modules/@aws-sdk/node_modules/strnum/tests

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

infinity_test.js830 B · 18 lines
import toNumber from "../strnum.js"; describe("Should convert all the valid numeric strings to number", () => {  it("should return infinity as per user option", () => {    expect(toNumber("1e1000", { infinity: "original" })).toEqual("1e1000");    expect(toNumber("1e1000", { infinity: "null" })).toEqual(null);    expect(toNumber("1e1000", { infinity: "infinity" })).toEqual(Infinity);    expect(toNumber("1e1000", { infinity: "string" })).toEqual("Infinity");    expect(toNumber("-1e1000", { infinity: "original" })).toEqual("-1e1000");    expect(toNumber("-1e1000", { infinity: "null" })).toEqual(null);    expect(toNumber("-1e1000", { infinity: "infinity" })).toEqual(-Infinity);    expect(toNumber("-1e1000", { infinity: "string" })).toEqual("-Infinity");      expect(toNumber("1e309")).toEqual("1e309");   });});