Import Cypress fixtures

1 · Gleb Bahmutov · June 15, 2020, 1:43 p.m.
In bahmutov/sudoku I am loading two JSON fixtures to mock a method that creates the new board. This ensures the game always starts with the same numbers and generates the same image for visual testing.1234567891011121314151617import React from 'react'import { App } from './App'import { mount } from 'cypress-react-unit-test'import * as UniqueSudoku from './solver/UniqueSudoku'describe('App', () => { it('mocks board creation', () => { cy.fixture('init-array').then(initArray => { cy.fixtur...