Skip to content

Commit

Permalink
test: rename withPack to withStandalone
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Dec 12, 2020
1 parent fabf1ba commit 88b07de
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion spec/ajv_instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ export default function getAjvInstances(
}
}

export function withPack(instances: AjvCore[]): (AjvCore | AjvPack)[] {
export function withStandalone(instances: AjvCore[]): (AjvCore | AjvPack)[] {
return (instances as (AjvCore | AjvPack)[]).concat(instances.map((ajv) => new AjvPack(ajv)))
}
4 changes: 2 additions & 2 deletions spec/extras.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import getAjvAllInstances from "./ajv_all_instances"
import {withPack} from "./ajv_instances"
import {withStandalone} from "./ajv_instances"
import {_} from ".."
import jsonSchemaTest = require("json-schema-test")
import options from "./ajv_options"
Expand All @@ -17,7 +17,7 @@ instances.forEach((ajv) => {
ajv.opts.code.formats = _`{allowedUnknown: true}`
})

jsonSchemaTest(withPack(instances), {
jsonSchemaTest(withStandalone(instances), {
description:
"Extra keywords schemas tests of " + instances.length + " ajv instances with different options",
suites: {extras: require("./_json/extras")},
Expand Down
4 changes: 2 additions & 2 deletions spec/json-schema.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _Ajv from "./ajv"
import _Ajv2019 from "./ajv2019"
import getAjvInstances, {withPack} from "./ajv_instances"
import getAjvInstances, {withStandalone} from "./ajv_instances"
import jsonSchemaTest = require("json-schema-test")
import options from "./ajv_options"
import {afterError, afterEach} from "./after_test"
Expand Down Expand Up @@ -72,7 +72,7 @@ function runTest(instances, draft: number, tests) {
ajvFormats(ajv)
}

jsonSchemaTest(withPack(instances), {
jsonSchemaTest(withStandalone(instances), {
description: `JSON-Schema Test Suite draft-${draft}: ${instances.length} ajv instances with different options`,
suites: {tests},
only: [],
Expand Down
4 changes: 2 additions & 2 deletions spec/schema-tests.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type AjvCore from "../dist/core"
import _Ajv from "./ajv"
import getAjvInstances, {withPack} from "./ajv_instances"
import getAjvInstances, {withStandalone} from "./ajv_instances"
import jsonSchemaTest = require("json-schema-test")
import options from "./ajv_options"
import {afterError, afterEach} from "./after_test"
Expand All @@ -27,7 +27,7 @@ const remoteRefsWithIds = [

instances.forEach(addRemoteRefsAndFormats)

jsonSchemaTest(withPack(instances), {
jsonSchemaTest(withStandalone(instances), {
description: `Schema tests of ${instances.length} ajv instances with different options`,
suites: {"Schema tests": require("./_json/tests")},
only: [],
Expand Down
4 changes: 2 additions & 2 deletions spec/security.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _Ajv from "./ajv"
import getAjvInstances, {withPack} from "./ajv_instances"
import getAjvInstances, {withStandalone} from "./ajv_instances"
import jsonSchemaTest = require("json-schema-test")
import options from "./ajv_options"
import {afterError, afterEach} from "./after_test"
Expand All @@ -11,7 +11,7 @@ const instances = getAjvInstances(_Ajv, options, {

instances.forEach((ajv) => (ajv.opts.code.source = true))

jsonSchemaTest(withPack(instances), {
jsonSchemaTest(withStandalone(instances), {
description:
"Secure schemas tests of " + instances.length + " ajv instances with different options",
suites: {security: require("./_json/security")},
Expand Down

0 comments on commit 88b07de

Please sign in to comment.