Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
738 changes: 339 additions & 399 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"tstyche": "^4.3.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.2",
"vitest": "^3.2.4",
"vitest": "^4.0.1",
"vue": "^3.5.22",
"vue2-6": "npm:vue@~2.6.14",
"vue2-7": "npm:vue@~2.7.16"
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/any.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { anyProp } from '../../src/prop-types/any';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('anyProp().optional', () => {
it('creates the correct prop options', () => {
expect(anyProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/array.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { arrayProp } from '../../src/prop-types/array';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('arrayProp().optional', () => {
it('creates the correct prop options', () => {
expect(arrayProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/boolean.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { booleanProp } from '../../src/prop-types/boolean';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('booleanProp().optional', () => {
it('creates the correct prop options', () => {
expect(booleanProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/date.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { dateProp } from '../../src/prop-types/date';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('dateProp().optional', () => {
it('creates the correct prop options', () => {
expect(dateProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/function.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { functionProp } from '../../src/prop-types/function';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('functionProp().optional', () => {
it('creates the correct prop options', () => {
expect(functionProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/instanceOf.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { instanceOfProp } from '../../src/prop-types/instanceOf';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

class User {}

describe('instanceOfProp().optional', () => {
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/integer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { integerProp } from '../../src/prop-types/integer';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('integerProp().optional', () => {
it('creates the correct prop options', () => {
expect(integerProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/number.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { numberProp } from '../../src/prop-types/number';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('numberProp().optional', () => {
it('creates the correct prop options', () => {
expect(numberProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/object.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { objectProp } from '../../src/prop-types/object';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('objectProp().optional', () => {
it('creates the correct prop options', () => {
expect(objectProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/oneOf.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { oneOfProp } from '../../src/prop-types/oneOf';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('oneOfProp().optional', () => {
it('creates the correct prop options', () => {
expect(oneOfProp(['a', 'b', 'c'] as const).optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/oneOfObjectKeys.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { oneOfObjectKeysProp } from '../../src/prop-types/oneOfObjectKeys';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

const options = { a: 'a', b: 'b', c: 'c' };

describe('oneOfObjectKeysProp().optional', () => {
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/oneOfTypes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { oneOfTypesProp } from '../../src/prop-types/oneOfTypes';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('oneOfTypesProp().optional', () => {
it('creates the correct prop options', () => {
expect(
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/string.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { stringProp } from '../../src/prop-types/string';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('stringProp().optional', () => {
it('creates the correct prop options', () => {
expect(stringProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/symbol.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { symbolProp } from '../../src/prop-types/symbol';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('symbolProp().optional', () => {
it('creates the correct prop options', () => {
expect(symbolProp().optional).toStrictEqual({
Expand Down
7 changes: 6 additions & 1 deletion tests/prop-types/vueComponent.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it } from 'vitest';
import { describe, expect, it, vi } from 'vitest';
import { vueComponentProp } from '../../src/prop-types/vueComponent';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe('vueComponentProp().optional', () => {
it('creates the correct prop options', () => {
expect(vueComponentProp().optional).toStrictEqual({
Expand Down
5 changes: 5 additions & 0 deletions tests/validators/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { describe, expect, it, vi } from 'vitest';
import { vuePropValidator } from '../../src/validators';

vi.mock(import('vue'), async () => ({
...(await vi.importActual('vue')),
default: undefined,
}));

describe(vuePropValidator, () => {
const validator1 = vi.fn<() => string | undefined>();
const validator2 = vi.fn<() => string | undefined>();
Expand Down