Skip to content

Commit b17bf54

Browse files
authored
chore: migrate more v2 tests (#254)
1 parent 75723c7 commit b17bf54

21 files changed

+2046
-14
lines changed

packages/runtime/test/policy/auth.test.ts renamed to packages/runtime/test/policy/migrated/auth.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('auth() tests', () => {
55
it('works with string id non-null test', async () => {

packages/runtime/test/policy/client-extensions.test.ts renamed to packages/runtime/test/policy/migrated/client-extensions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from 'vitest';
2-
import { definePlugin } from '../../src/client';
3-
import { createPolicyTestClient } from './utils';
2+
import { definePlugin } from '../../../src/client';
3+
import { createPolicyTestClient } from '../utils';
44

55
describe('client extensions tests for policies', () => {
66
it('query override one model', async () => {

packages/runtime/test/policy/connect-disconnect.test.ts renamed to packages/runtime/test/policy/migrated/connect-disconnect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('connect and disconnect tests', () => {
55
const modelToMany = `

packages/runtime/test/policy/create-many-and-return.test.ts renamed to packages/runtime/test/policy/migrated/create-many-and-return.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('createManyAndReturn tests', () => {
55
it('works with model-level policies', async () => {

packages/runtime/test/policy/cross-model-field-comparison.test.ts renamed to packages/runtime/test/policy/migrated/cross-model-field-comparison.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('cross-model field comparison tests', () => {
55
it('works with to-one relation', async () => {

packages/runtime/test/policy/current-model.test.ts renamed to packages/runtime/test/policy/migrated/current-model.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, it, expect } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('currentModel tests', () => {
55
it('works in models', async () => {

packages/runtime/test/policy/current-operation.test.ts renamed to packages/runtime/test/policy/migrated/current-operation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, it, expect } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('currentOperation tests', () => {
55
it('works with specific rules', async () => {

packages/runtime/test/policy/deep-nested.test.ts renamed to packages/runtime/test/policy/migrated/deep-nested.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { beforeEach, describe, expect, it } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('deep nested operations tests', () => {
55
const model = `

packages/runtime/test/policy/empty-policy.test.ts renamed to packages/runtime/test/policy/migrated/empty-policy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { createPolicyTestClient } from './utils';
2+
import { createPolicyTestClient } from '../utils';
33

44
describe('empty policy tests', () => {
55
it('works with simple operations', async () => {

0 commit comments

Comments
 (0)