// foo.ts
import { test as base } from "@playwright/test";
const test = base.extend<{foo: string}>({
foo: "hello"
});
export { test };
// bar.ts
import { test as base } from "@playwright/test";
const test = base.extend<{bar: string}>({
bar: "bye"
});
export { test };
// index.ts
import { test } from /* BOTH_FOO_AND_BAR??? */;
test("Basic test", async ({ foo, bar }) => { // <-- I want to be able to use both foo and bar fixture here
console.log(foo);
console.log(bar);
});
Can the above be achieved? Or do I have to have one depends on the other like this?
// bar.ts
import { test as base } from "./foo";
// index.ts
import { test } from "./bar";
This will create a long chain if I have many files and importing the last file would import all of them. I would prefer pick and match if it is at all possible.