New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@denofill/testing

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@denofill/testing - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

dist/denofillbench.d.ts

13

package.json
{
"name": "@denofill/testing",
"version": "0.1.0",
"version": "0.2.0",
"description": "🧪 Deno.test() and Deno.bench() for anywhere",

@@ -76,3 +76,2 @@ "keywords": [

"serve": "^14.2.0",
"tsx": "^3.12.7",
"typedoc": "^0.24.8",

@@ -92,3 +91,13 @@ "typescript": "^5.1.6",

"skipErrorChecking": true
},
"dependencies": {
"execa": "^8.0.0",
"glob": "^10.3.3",
"ts-dedent": "^2.2.0",
"tsx": "^3.12.7"
},
"bin": {
"denofilltest": "./dist/denofilltest.js",
"denofillbench": "./dist/denofillbench.js"
}
}

@@ -1,1 +0,65 @@

# testing
# Deno testing for anywhere
🧪 [`Deno.test()`] and [`Deno.bench()`] for anywhere
## Installation
You can install this package using npm, pnpm, Yarn, or your other favorite npm
package manager:
```sh
npm install @denofill/testing
```
## Usage
You can import this package in Node.js, Deno, and the browser and it will Just
Work™. In Deno, you'll get a passthrough to the native `Deno.test()` function,
while in Node.js and the browser you'll get a shim that implements the same API.
```js
// If you set DENOFILL_TEST=1 in Node.js, this will run the tests. Otherwise,
// this will be a no-op.
import * as Deno from "@denofill/testing";
import assert from "node:assert";
Deno.test("1 + 2 = 3", () => {
assert.equal(1 + 2, 3);
});
```
```html
<script>
// You can also manually do this in DevTools and reload the page.
sessionStorage.setItem("denofill_test", "1");
</script>
<script type="module">
import * as Deno from "https://esm.run/@denofill/testing";
import assert from "https://esm.run/@nodefill/assert";
Deno.test("1 + 2 = 3", () => {
assert.equal(1 + 2, 3);
});
</script>
```
⚠️ Even though it kinda looks like it, the `Deno` import is **not** the real
Deno namespace object! It's only got two functions: `Deno.test()` and
`Deno.bench()`.
You can also use the shim CLI to run tests and benchmarks using `tsx`:
```sh
denofilltest
denofillbench
```
<details><summary>You can combine this <code>Deno</code> namespace with other <a href="https://github.com/denofill">@denofill</a> modules to build a custom Deno namespace</summary>
```js
import * as Deno1 from "@denofill/testing";
import * as Deno2 from "@denofill/http-server";
const Deno = { ...Deno1, ...Deno2 };
```
</details>
dist/bench.d.ts
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc