trim down test cases
This commit is contained in:
parent
9a32dad948
commit
dda6532e52
|
|
@ -37,23 +37,11 @@ test('should detect untracked files', async ({ runInlineTest, git, writeFiles })
|
||||||
await writeFiles({
|
await writeFiles({
|
||||||
'a.spec.ts': `
|
'a.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
`,
|
||||||
'b.spec.ts': `
|
'b.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
|
||||||
'utils.ts': `
|
|
||||||
export * from './answer';
|
|
||||||
export * from './question';
|
|
||||||
`,
|
|
||||||
'answer.ts': `
|
|
||||||
export const answer = 42;
|
|
||||||
`,
|
|
||||||
'question.ts': `
|
|
||||||
export const question = "???";
|
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -77,23 +65,11 @@ test('should detect changed files', async ({ runInlineTest, git, writeFiles }) =
|
||||||
await writeFiles({
|
await writeFiles({
|
||||||
'a.spec.ts': `
|
'a.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
`,
|
||||||
'b.spec.ts': `
|
'b.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
|
||||||
'utils.ts': `
|
|
||||||
export * from './answer';
|
|
||||||
export * from './question';
|
|
||||||
`,
|
|
||||||
'answer.ts': `
|
|
||||||
export const answer = 42;
|
|
||||||
`,
|
|
||||||
'question.ts': `
|
|
||||||
export const question = "???";
|
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -116,23 +92,11 @@ test('should diff based on base commit', async ({ runInlineTest, git, writeFiles
|
||||||
await writeFiles({
|
await writeFiles({
|
||||||
'a.spec.ts': `
|
'a.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
`,
|
||||||
'b.spec.ts': `
|
'b.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
|
||||||
'utils.ts': `
|
|
||||||
export * from './answer';
|
|
||||||
export * from './question';
|
|
||||||
`,
|
|
||||||
'answer.ts': `
|
|
||||||
export const answer = 42;
|
|
||||||
`,
|
|
||||||
'question.ts': `
|
|
||||||
export const question = "???";
|
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -197,23 +161,11 @@ test('should support watch mode', async ({ git, writeFiles, runWatchTest }) => {
|
||||||
await writeFiles({
|
await writeFiles({
|
||||||
'a.spec.ts': `
|
'a.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
`,
|
||||||
'b.spec.ts': `
|
'b.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
|
||||||
'utils.ts': `
|
|
||||||
export * from './answer';
|
|
||||||
export * from './question';
|
|
||||||
`,
|
|
||||||
'answer.ts': `
|
|
||||||
export const answer = 42;
|
|
||||||
`,
|
|
||||||
'question.ts': `
|
|
||||||
export const question = "???";
|
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -322,23 +274,11 @@ test.describe('should work the same if being called in subdirectory', () => {
|
||||||
await writeFiles({
|
await writeFiles({
|
||||||
'a.spec.ts': `
|
'a.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
`,
|
||||||
'b.spec.ts': `
|
'b.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
|
||||||
'utils.ts': `
|
|
||||||
export * from './answer';
|
|
||||||
export * from './question';
|
|
||||||
`,
|
|
||||||
'answer.ts': `
|
|
||||||
export const answer = 42;
|
|
||||||
`,
|
|
||||||
'question.ts': `
|
|
||||||
export const question = "???";
|
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -370,23 +310,11 @@ test.describe('should work the same if being called in subdirectory', () => {
|
||||||
await writeFiles({
|
await writeFiles({
|
||||||
'a.spec.ts': `
|
'a.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
`,
|
||||||
'b.spec.ts': `
|
'b.spec.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { answer, question } from './utils';
|
test('fails', () => { expect(1).toBe(2); });
|
||||||
test('fails', () => { expect(question).toBe(answer); });
|
|
||||||
`,
|
|
||||||
'utils.ts': `
|
|
||||||
export * from './answer';
|
|
||||||
export * from './question';
|
|
||||||
`,
|
|
||||||
'answer.ts': `
|
|
||||||
export const answer = 42;
|
|
||||||
`,
|
|
||||||
'question.ts': `
|
|
||||||
export const question = "???";
|
|
||||||
`,
|
`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue