Skip to content

Commit

Permalink
chore: update skypack imports to npm: imports (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
GJZwiers authored Nov 13, 2023
1 parent c17b57d commit b46c238
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions runtime/manual/basics/testing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,10 @@ For example integration see:

Test spies are function stand-ins that are used to assert if a function's
internal behavior matches expectations. Sinon is a widely used testing library
that provides test spies and can be used in Deno by importing it from a CDN,
such as Skypack:
that provides test spies and can be used in Deno by importing it from NPM:

```js
import sinon from "https://cdn.skypack.dev/sinon";
import sinon from "npm:sinon";
```

Say we have two functions, `foo` and `bar` and want to assert that `bar` is
Expand All @@ -473,7 +472,7 @@ This way, we can call `foo(bar)` in the application code or wrap a spy function
around `bar` and call `foo(spy)` in the testing code:

```js, ignore
import sinon from "https://cdn.skypack.dev/sinon";
import sinon from "npm:sinon";
import { assertEquals } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";
import { bar, foo } from "./my_file.js";
Expand Down Expand Up @@ -513,7 +512,7 @@ export function foo() {
And then `import` in a test file:

```js, ignore
import sinon from "https://cdn.skypack.dev/sinon";
import sinon from "npm:sinon";
import { assertEquals } from "https://deno.land/std@$STD_VERSION/assert/mod.ts";
import { foo, funcs } from "./my_file.js";
Expand Down

0 comments on commit b46c238

Please sign in to comment.