Skip to content

Commit

Permalink
debug env var issue with Cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
gilzow committed Jun 14, 2024
1 parent f01f393 commit b909171
Show file tree
Hide file tree
Showing 5 changed files with 3,400 additions and 2 deletions.
3 changes: 3 additions & 0 deletions 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

DevTools listening on ws://127.0.0.1:54931/devtools/browser/cd140afa-4821-4db9-b379-0086f03f57bd
2024-06-14 14:32:52.585 Cypress[67702:7711772] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
15 changes: 14 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
module.exports = {
e2e: {
setupNodeEvents(on, config) {},
baseUrl: 'http://localhost:1313/',
env: {
barfoo: "from config",
env: "local",
},
setupNodeEvents(on, config) {
on('task', {
log(message) {
console.log(message)

return null
},
})
},
},
}
2 changes: 2 additions & 0 deletions cypress/e2e/spec.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
describe('page', () => {
it('works', () => {
cy.visit('https://example.cypress.io')
cy.task("log","Env is " + Cypress.env('env'))
cy.task("log","Barfoo is " + Cypress.env('barfoo'))
})
})
Loading

0 comments on commit b909171

Please sign in to comment.