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

feat(testrunner): introduce environments #1593

Merged
merged 1 commit into from Apr 1, 2020
Merged

feat(testrunner): introduce environments #1593

merged 1 commit into from Apr 1, 2020

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Mar 30, 2020

Intended usecase is to have "class of tests" defined once, which can be used in any test suite.

const pageEnv = environment('page environment', () => {
  beforeAll(() => {});
  afterAll(() => {});
  beforeEach(() => {});
  afterEach(() => {});
});
testRunner.testAttribute('page', t => t.environment(pageEnv));
testRunner.pageIt = testRunner.it.page;  // optionally


// Later on:
describe('my suite', () => {
  it.page('test', () => {});
  pageIt('test', () => {});  // optionally
});

@dgozman dgozman changed the title feat(testrunner): introduce prependSuite feat(testrunner): introduce environments Mar 31, 2020
@dgozman dgozman merged commit f87e645 into microsoft:master Apr 1, 2020
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.

None yet

2 participants