Skip to content

Fix Context constructor references when a page instance is omitted#565

Open
ChadKillingsworth wants to merge 1 commit into
visionmedia:masterfrom
ChadKillingsworth:context-constructor
Open

Fix Context constructor references when a page instance is omitted#565
ChadKillingsworth wants to merge 1 commit into
visionmedia:masterfrom
ChadKillingsworth:context-constructor

Conversation

@ChadKillingsworth
Copy link
Copy Markdown
Contributor

I was attempting to upgrade my version of Page.js, but encountered errors. Unit tests in my project create Context objects directly and those calls were failing. In particular, _page._getBase() is undefined when the Context object is constructed such as new page.Context('/some/path').

In my project, this isn't used in real code - just tests, but the fallback logic was clearly wrong too.

@ChadKillingsworth
Copy link
Copy Markdown
Contributor Author

Oh one note - the build script didn't seem to build the page.mjs file. I had to manually change the output format in the rollup config for that to be built.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.2%) to 94.262% when pulling cb6b482 on ChadKillingsworth:context-constructor into 4f99916 on visionmedia:master.

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.

2 participants