Skip to content

Commit a037b4c

Browse files
committed
Add example of using @env to override test configuration
1 parent c22446b commit a037b4c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/test-configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Some of Cypress' [configuration options](https://docs.cypress.io/guides/referenc
66
@animationDistanceThreshold(5)
77
@blockHosts('http://www.foo.com','http://www.bar.com')
88
@defaultCommandTimeout(5)
9+
@env(foo='bar',baz=5,qux=false)
910
@execTimeout(5)
1011
@includeShadowDom(true)
1112
@includeShadowDom(false)

lib/tag-parser.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ describe("tagToCypressOptions", () => {
2222
blockHosts: ["http://www.foo.com", "http://www.bar.com"],
2323
});
2424
example("@defaultCommandTimeout(5)", { defaultCommandTimeout: 5 });
25+
example("@env(foo='bar',baz=5,qux=false)", {
26+
env: { foo: "bar", baz: 5, qux: false },
27+
});
2528
example("@execTimeout(5)", { execTimeout: 5 });
2629
// example("@experimentalSessionAndOrigin(true)", {
2730
// experimentalSessionAndOrigin: 5,

0 commit comments

Comments
 (0)