Skip to content

Add eyesItInstance#30

Open
hepiyellow wants to merge 2 commits intomasterfrom
craete_eyesit_instance
Open

Add eyesItInstance#30
hepiyellow wants to merge 2 commits intomasterfrom
craete_eyesit_instance

Conversation

@hepiyellow
Copy link
Contributor

@hepiyellow hepiyellow commented Nov 28, 2018

Add a eyesItInstance function which creates an eyes delegator with a default config object,
so you don't have to pass config options in every test.
And still allows different test-suits to have different configs (not a global eyes-it config).

import { eyesItInstance } from 'eyes.it';

const eyes = eyesItInstance({width: 1024, height: 768});

eyes.it('should run test 1', async () => {
    // test 1
});

eyes.it('should run test 2', async () => {
    // test 2
});

The underlaying eyes instance is the same eyes singleton that you get when you do:
import eyes from 'eyes.it'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant