1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00
denoland-deno/std
Bartek Iwańczuk 6e2df8c64f
feat: Deno.test() sanitizes ops and resources (#4399)
This PR brings assertOps and assertResources sanitizers to Deno.test() API.

assertOps checks that test doesn't leak async ops, ie. there are no unresolved
promises originating from Deno APIs. Enabled by default, can be disabled using 
Deno.TestDefinition.disableOpSanitizer.

assertResources checks that test doesn't leak resources, ie. all resources used
in test are closed. For example; if a file is opened during a test case it must be
explicitly closed before test case finishes. It's most useful for asynchronous
generators. Enabled by default, can be disabled using 
Deno.TestDefinition.disableResourceSanitizer.

We've used those sanitizers in internal runtime tests and it proved very useful in
surfacing incorrect tests which resulted in interference between the tests.

All tests have been sanitized.

Closes #4208
2020-03-18 19:25:55 -04:00
..
archive BREAKING CHANGE FileInfo.len renamed to FileName.size (#4338) 2020-03-14 22:57:42 -04:00
bytes refactor: rewrite tests in std/ to use Deno.test (#3930) 2020-02-11 17:24:27 +01:00
datetime refactor: rewrite tests in std/ to use Deno.test (#3930) 2020-02-11 17:24:27 +01:00
encoding feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
examples feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
flags refactor: Cleanup options object parameters (#4296) 2020-03-10 12:08:58 -04:00
fmt refactor: rewrite tests in std/ to use Deno.test (#3930) 2020-02-11 17:24:27 +01:00
fs feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
http feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
io feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
log refactor: rewrite tests in std/ to use Deno.test (#3930) 2020-02-11 17:24:27 +01:00
media_types refactor: rewrite tests in std/ to use Deno.test (#3930) 2020-02-11 17:24:27 +01:00
mime feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
node feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
path refactor: remove unneeded ErrorKinds (#3936) 2020-02-21 10:36:13 -05:00
signal feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
strings refactor: rewrite tests in std/ to use Deno.test (#3930) 2020-02-11 17:24:27 +01:00
testing feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
textproto refactor(std): Uncomment disabled tests, use skip option (#4378) 2020-03-15 13:03:25 +01:00
types std: Provide types for React and ReactDOM (#4376) 2020-03-17 13:28:07 +01:00
util Enable TS strict mode by default (#3899) 2020-02-19 15:36:18 -05:00
uuid reduce unnecessary output on tests (#4148) 2020-02-27 15:12:04 -05:00
ws feat: Deno.test() sanitizes ops and resources (#4399) 2020-03-18 19:25:55 -04:00
manual.md Update manual (#4412) 2020-03-17 17:56:33 -07:00
README.md feat: dprint formatter (#3820) 2020-01-29 21:16:48 -05:00
style_guide.md update references to testing/mod.ts in manual (#3973) 2020-02-11 21:50:20 +01:00

Deno Standard Modules

These modules do not have external dependencies and they are reviewed by the Deno core team. The intention is to have a standard set of high quality code that all Deno projects can use fearlessly.

Contributions are welcome!

How to use

These modules are tagged in accordance with Deno releases. So, for example, the v0.3.0 tag is guaranteed to work with deno v0.3.0. You can link to v0.3.0 using the URL https://deno.land/std@v0.3.0/

It's strongly recommended that you link to tagged releases rather than the master branch. The project is still young and we expect disruptive renames in the future.

Documentation

Here are the dedicated documentations of modules:

Contributing

deno_std is a loose port of Go's standard library. When in doubt, simply port Go's source code, documentation, and tests. There are many times when the nature of JavaScript, TypeScript, or Deno itself justifies diverging from Go, but if possible we want to leverage the energy that went into building Go. We generally welcome direct ports of Go's code.

Please ensure the copyright headers cite the code's origin.

Follow the style guide.