Skip to content

Commit

Permalink
Fix nodejs test
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Mar 25, 2024
1 parent a6fac01 commit 4566eb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions bindings/nodejs/tests/suites/async.suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* under the License.
*/

import { randomUUID } from 'node:crypto'
import { test } from 'vitest'
import { generateBytes, generateFixedBytes } from '../utils.mjs'
import { Readable, Writable } from 'node:stream'
import { finished, pipeline } from 'node:stream/promises'
import {randomUUID} from 'node:crypto'
import {test} from 'vitest'
import {generateBytes, generateFixedBytes} from '../utils.mjs'
import {Readable, Writable} from 'node:stream'
import {finished, pipeline} from 'node:stream/promises'

export function run(op) {
describe('async tests', () => {
Expand Down Expand Up @@ -56,7 +56,7 @@ export function run(op) {
await op.delete(filename)
})

test.runIf(op.capability().write)('read stream', async () => {
test.runIf(op.capability().read && op.capability().write)('read stream', async () => {
let c = generateFixedBytes(3 * 1024 * 1024)
const filename = `random_file_${randomUUID()}`

Expand Down
12 changes: 6 additions & 6 deletions bindings/nodejs/tests/suites/sync.suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* under the License.
*/

import { randomUUID } from 'node:crypto'
import { test } from 'vitest'
import { WriteStream, ReadStream } from '../../index.js'
import { generateFixedBytes } from '../utils.mjs'
import { Readable } from 'node:stream'
import {randomUUID} from 'node:crypto'
import {test} from 'vitest'
import {WriteStream, ReadStream} from '../../index.js'
import {generateFixedBytes} from '../utils.mjs'
import {Readable} from 'node:stream'

export function run(op) {
describe.runIf(op.capability().blocking)('sync tests', () => {
Expand Down Expand Up @@ -59,7 +59,7 @@ export function run(op) {
},
)

test.runIf(op.capability().write)('blocking read stream', async () => {
test.runIf(op.capability().read && op.capability().write)('blocking read stream', async () => {
let c = generateFixedBytes(3 * 1024 * 1024)
const filename = `random_file_${randomUUID()}`

Expand Down

0 comments on commit 4566eb0

Please sign in to comment.