Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eyesItInstance #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add eyesItInstance #30

wants to merge 2 commits into from

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