summaryrefslogtreecommitdiff
path: root/cli/tests/unit/text_encoding_test.ts
AgeCommit message (Collapse)Author
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.
2024-02-07chore: upgrade deno_core to 0.259.0 (#22311)Bartek Iwańczuk
This update brings number of ops available to user code down to 45.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-11-13chore(ext/web): use a non-resource stream for ↵Matt Mastracci
textDecoderStreamCleansUpOnCancel (#21181) Follow-up fix to #21074
2023-11-12fix(ext/web): Prevent TextDecoderStream resource leak on stream cancellation ↵Florian Schwalm
(#21074) This PR uses the new `cancel` method of `TransformStream` to properly clean up the internal `TextDecoder` used in `TextDecoderStream` if the stream is cancelled. Fixes #13142 Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-01-24refactor: remove Deno.core (#16881)Bartek Iwańczuk
This commit removes "Deno.core" namespace. It is strictly private API that has no stability guarantees, we were supposed to remove it long time ago. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-10-24perf(ext/web): add op_encode_binary_string (#16352)Marcos Casagrande
Add a new op to use in `reader.readAsBinaryString(blob)`. ``` File API binary string: 400b 35.12 µs/iter (21.93 µs … 3.27 ms) 31.87 µs 131.95 µs 217.63 µs File API binary string: 4kb 46.49 µs/iter (29.36 µs … 4.42 ms) 42.5 µs 122.48 µs 155.1 µs File API binary string: 2.2mb 4.17 ms/iter (1.75 ms … 8.54 ms) 5.48 ms 7.39 ms 8.54 ms ``` **main** ``` benchmark time (avg) (min … max) p75 p99 p995 --------------------------------------------------------------------- ----------------------------- File API binary string: 400b 56.17 µs/iter (43.09 µs … 784.52 µs) 49.6 µs 177.18 µs 241.23 µs File API binary string: 4kb 277.2 µs/iter (240.29 µs … 1.84 ms) 269.87 µs 649.79 µs 774.46 µs File API binary string: 2.2mb 180.03 ms/iter (173.32 ms … 194.35 ms) 182.54 ms 194.35 ms 194.35 ms ``` It can also handle bigger files, when encoding a 200mb file, main crashes with OOM ``` <--- Last few GCs ---> [132677:0x560504676550] 5012 ms: Scavenge 417.3 (434.6) -> 401.8 (434.6) MB, 0.1 / 0.0 ms (average mu = 0.824, current mu = 0.825) allocation failure; [132677:0x560504676550] 5038 ms: Scavenge 417.3 (434.6) -> 401.8 (434.6) MB, 0.1 / 0.0 ms (average mu = 0.824, current mu = 0.825) allocation failure; [132677:0x560504676550] 5064 ms: Scavenge 417.3 (434.6) -> 401.8 (434.6) MB, 0.1 / 0.0 ms (average mu = 0.824, current mu = 0.825) allocation failure; ```
2022-01-20chore: update copyright year (#13434)Yoshiya Hinosawa
2021-11-23refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)Bartek Iwańczuk
2021-10-28feat(cli): enable `useUnknownInCatchVariables` by default (#12547)Kitson Kelly
Closes #11826 **BREAKING CHANGE** this behaviour was disable when introduced in Deno 1.14/TypeScript 4.4. It will highlight code that unsafely handles variables that are caught, and will cause type errors in unsafe code.
2021-08-05refactor(cli/tests): remove unnecessary void return types (#11577)Leo K
2021-05-08fix: TextEncoder#encodeInto spec compliance + perf gains (#10129)Thiago Padilha
2021-04-09chore: upgrade dependencies (#10094)Bartek Iwańczuk
This commit upgrades: - swc_ecmascript - swc_bundler - deno_doc - deno_lint - dprint-plugin-typescript
2021-02-16fix: align btoa to spec (#9053)Casper Beyer
2021-01-24feat(op_crates/web): adding gb18030 and GBK encodings (#9242)ali ahmed
2021-01-11chore: update copyright to 2021 (#9092)Yusuke Tanaka
2021-01-11fix(op_crate/web): fix atob to throw spec aligned DOMException (#8798)gorogoroumaru
2021-01-05fix: align encoding APIs to spec using WPT (#9004)Luca Casonato
2020-11-02fix(op_crates/web): make TextEncoder work with forced non-strings (#8206)Benjamin Gruenbaum
Fixes: #8201
2020-10-20fix(op_crates/web): TextEncoder should return error message with original ↵aca
input (#8005)
2020-10-19fix(op_crates/web): TextEncoder should throw RangeError (#8039)Leonard Ginters
This commit changes error type thrown by TextEncoder, when provided encoding is not supported matching Chromium behavior.
2020-09-27feat(fmt): Sort named import and export specifiers (#7711)David Sherret
2020-07-14Use dprint for internal formatting (#6682)David Sherret
2020-06-25refactor(cli/tests/unit) to use assertThrows (#6459)Casper Beyer
2020-05-20move js unit tests to cli/tests (#5678)Ryan Dahl