You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/expect.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ type Awaitable<T> = T | PromiseLike<T>
135
135
For example, having this code you don't care for the return value of `stocks.getInfo` - it maybe a complex object, a string, or anything else. The code will still work.
136
136
137
137
```ts
138
-
import { Stocks } from'./stocks'
138
+
import { Stocks } from'./stocks.js'
139
139
const stocks =newStocks()
140
140
stocks.sync('Bill')
141
141
if (stocks.getInfo('Bill'))
@@ -146,7 +146,7 @@ type Awaitable<T> = T | PromiseLike<T>
146
146
147
147
```ts
148
148
import { expect, test } from'vitest'
149
-
import { Stocks } from'./stocks'
149
+
import { Stocks } from'./stocks.js'
150
150
const stocks =newStocks()
151
151
152
152
test('if we know Bill stock, sell apples to him', () => {
@@ -166,7 +166,7 @@ type Awaitable<T> = T | PromiseLike<T>
166
166
For example, having this code you don't care for the return value of `stocks.stockFailed` - it may return any falsy value, but the code will still work.
167
167
168
168
```ts
169
-
import { Stocks } from'./stocks'
169
+
import { Stocks } from'./stocks.js'
170
170
const stocks =newStocks()
171
171
stocks.sync('Bill')
172
172
if (!stocks.stockFailed('Bill'))
@@ -177,7 +177,7 @@ type Awaitable<T> = T | PromiseLike<T>
177
177
178
178
```ts
179
179
import { expect, test } from'vitest'
180
-
import { Stocks } from'./stocks'
180
+
import { Stocks } from'./stocks.js'
181
181
const stocks =newStocks()
182
182
183
183
test('if Bill stock hasn\'t failed, sell apples to him', () => {
@@ -251,7 +251,7 @@ type Awaitable<T> = T | PromiseLike<T>
251
251
252
252
```ts
253
253
import { expect, test } from'vitest'
254
-
import { Stocks } from'./stocks'
254
+
import { Stocks } from'./stocks.js'
255
255
const stocks =newStocks()
256
256
257
257
test('stocks are instance of Stocks', () => {
@@ -267,7 +267,7 @@ type Awaitable<T> = T | PromiseLike<T>
267
267
268
268
```ts
269
269
import { expect, test } from'vitest'
270
-
import { getApples } from'./stock'
270
+
import { getApples } from'./stocks.js'
271
271
272
272
test('have more then 10 apples', () => {
273
273
expect(getApples()).toBeGreaterThan(10)
@@ -282,7 +282,7 @@ type Awaitable<T> = T | PromiseLike<T>
282
282
283
283
```ts
284
284
import { expect, test } from'vitest'
285
-
import { getApples } from'./stock'
285
+
import { getApples } from'./stocks.js'
286
286
287
287
test('have 11 apples or more', () => {
288
288
expect(getApples()).toBeGreaterThanOrEqual(11)
@@ -297,7 +297,7 @@ type Awaitable<T> = T | PromiseLike<T>
297
297
298
298
```ts
299
299
import { expect, test } from'vitest'
300
-
import { getApples } from'./stock'
300
+
import { getApples } from'./stocks.js'
301
301
302
302
test('have less then 20 apples', () => {
303
303
expect(getApples()).toBeLessThan(20)
@@ -312,7 +312,7 @@ type Awaitable<T> = T | PromiseLike<T>
312
312
313
313
```ts
314
314
import { expect, test } from'vitest'
315
-
import { getApples } from'./stock'
315
+
import { getApples } from'./stocks.js'
316
316
317
317
test('have 11 apples or less', () => {
318
318
expect(getApples()).toBeLessThanOrEqual(11)
@@ -386,7 +386,7 @@ type Awaitable<T> = T | PromiseLike<T>
386
386
387
387
```ts
388
388
import { expect, test } from'vitest'
389
-
import { getAllFruits } from'./stock'
389
+
import { getAllFruits } from'./stocks.js'
390
390
391
391
test('the fruit list contains orange', () => {
392
392
expect(getAllFruits()).toContain('orange')
@@ -402,7 +402,7 @@ type Awaitable<T> = T | PromiseLike<T>
0 commit comments