Skip to content

Commit 2c04871

Browse files
authored
feat: Use skip as the option name (#13)
1 parent 5696a9b commit 2c04871

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ export type AdapterTestName =
2424
export type AdapterTestMap = Record<AdapterTestName, boolean>
2525

2626
export type DefineTestSuiteOptions = {
27+
/**
28+
* @deprecated use skip
29+
*/
2730
blacklist?: AdapterTestName[]
31+
skip?: AdapterTestName[]
2832
only?: AdapterTestName[]
2933
}
3034

@@ -34,7 +38,8 @@ export const defineTestSuite = (defineOptions?: DefineTestSuiteOptions) => {
3438

3539
const test = (name: string, runner: any) => {
3640
let skip = false
37-
if (defineOptions?.blacklist?.includes(name as AdapterTestName)) {
41+
const skipNames = defineOptions?.skip || defineOptions?.blacklist || []
42+
if (skipNames.includes(name as AdapterTestName)) {
3843
skip = true
3944
}
4045
if (

test/feathers-memory.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { MemoryService } from '@feathersjs/memory'
55
import { describe } from 'vitest'
66

77
const testSuite = defineTestSuite({
8-
blacklist: [
8+
skip: [
99
'.update + id + query', // need to be fixed upstream, see https://github.com/feathersjs/feathers/pull/3617
1010
'.update + id + query id', // need to be fixed upstream, see https://github.com/feathersjs/feathers/pull/3617
1111
],

test/feathers-sequelize.test_.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { defineTestSuite } from '../src/index.js'
77
import { beforeAll, describe } from 'vitest'
88

99
const testSuite = defineTestSuite({
10-
blacklist: [
10+
skip: [
1111
'.get + NotFound (string)',
1212
'.patch + NotFound (string)',
1313
'.remove + NotFound (string)',

0 commit comments

Comments
 (0)