Why testcafe runs tests twice?

Viewed 111

I just don't understand, why testcafe runs this test twice in my case :

MainApp.ts :

const getUrl = ClientFunction(() => window.location.href);
class MainApp {
  async login(url:string) {
    await t.expect(getUrl()).eql(url);
  }} 
export default new MainApp();

Test.ts :

import MailosaurClient from "mailosaur";
import { Selector, t } from "testcafe";
import MainApp from "./MainApp";
const testUrl = `https://www.google.com/`;
fixture("fixture")
  .page("https://www.google.com/")
  .beforeEach(async (t) => {
    console.log("test");
  })
  .disablePageCaching("fixture");

test("Test", async (t) => {
  console.log("Starting test");
  await MainApp.login(
    testUrl
  );
1 Answers

Your code is running fine not running twice just update node and install testcafe and

type npx testcafe <browser> <path>

Related