diff options
author | 2022-11-09 15:40:40 -0800 | |
---|---|---|
committer | 2022-11-09 15:40:40 -0800 | |
commit | f7f1b604443c030afe29d1059b90f72c69afe081 (patch) | |
tree | 8f2397447b2a84dab02850007264b72cc565f5d6 /test/bun.js/path.test.js | |
parent | da257336b0b70df8c31da647496899cf70670000 (diff) | |
download | bun-f7f1b604443c030afe29d1059b90f72c69afe081.tar.gz bun-f7f1b604443c030afe29d1059b90f72c69afe081.tar.zst bun-f7f1b604443c030afe29d1059b90f72c69afe081.zip |
Add bun-types, add typechecking, add `child_process` types (#1475)
* Add bun-types to packages
* Improve typing
* Fix types in tests
* Fix dts tests
* Run formatter
* Fix all type errors
* Add strict mode, fix type errors
* Add ffi changes
* Move workflows to root
* Add workflows
* Remove labeler
* Add child_process types
* Fix synthetic defaults issue
* Remove docs
* Move scripts
* Run prettier
* Include examples in typechecking
* captureStackTrace types
* moved captureStackTrace types to globals
* Address reviews
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Diffstat (limited to 'test/bun.js/path.test.js')
-rw-r--r-- | test/bun.js/path.test.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/bun.js/path.test.js b/test/bun.js/path.test.js index 72dad93d2..97132512c 100644 --- a/test/bun.js/path.test.js +++ b/test/bun.js/path.test.js @@ -66,7 +66,7 @@ it("path.basename", () => { // On unix a backslash is just treated as any other character. strictEqual( path.posix.basename("\\dir\\basename.ext"), - "\\dir\\basename.ext" + "\\dir\\basename.ext", ); strictEqual(path.posix.basename("\\basename.ext"), "\\basename.ext"); strictEqual(path.posix.basename("basename.ext"), "basename.ext"); @@ -79,7 +79,7 @@ it("path.basename", () => { const controlCharFilename = `Icon${String.fromCharCode(13)}`; strictEqual( path.posix.basename(`/a/b/${controlCharFilename}`), - controlCharFilename + controlCharFilename, ); }); @@ -215,7 +215,7 @@ it("path.join", () => { if (actual !== expected && actualAlt !== expected) { const delimiter = test[0].map(JSON.stringify).join(","); const message = `path.${os}.join(${delimiter})\n expect=${JSON.stringify( - expected + expected, )}\n actual=${JSON.stringify(actual)}`; failures.push(`\n${message}`); } @@ -295,7 +295,7 @@ it("path.relative", () => { .slice(0, 2) .map(JSON.stringify) .join(",")})\n expect=${JSON.stringify( - expected + expected, )}\n actual=${JSON.stringify(actual)}`; failures.push(`\n${message}`); } @@ -355,7 +355,7 @@ it("path.normalize", () => { strictEqual( path.posix.normalize("./fixtures///b/../b/c.js"), - "fixtures/b/c.js" + "fixtures/b/c.js", ); strictEqual(path.posix.normalize("/foo/../../../bar"), "/bar"); strictEqual(path.posix.normalize("a//b//../b"), "a/b"); @@ -372,19 +372,19 @@ it("path.normalize", () => { strictEqual(path.posix.normalize("../.../.././.../../../bar"), "../../bar"); strictEqual( path.posix.normalize("../../../foo/../../../bar"), - "../../../../../bar" + "../../../../../bar", ); strictEqual( path.posix.normalize("../../../foo/../../../bar/../../"), - "../../../../../../" + "../../../../../../", ); strictEqual( path.posix.normalize("../foobar/barfoo/foo/../../../bar/../../"), - "../../" + "../../", ); strictEqual( path.posix.normalize("../.../../foobar/../../../bar/../../baz"), - "../../../../baz" + "../../../../baz", ); strictEqual(path.posix.normalize("foo/bar\\baz"), "foo/bar\\baz"); }); @@ -446,7 +446,7 @@ it("path.resolve", () => { const message = `path.${os}.resolve(${test .map(JSON.stringify) .join(",")})\n expect=${JSON.stringify( - expected + expected, )}\n actual=${JSON.stringify(actual)}`; if (actual !== expected && actualAlt !== expected) failures.push(message); }); |