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

Update to marko-cli #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abiyasa
Copy link

@abiyasa abiyasa commented Dec 21, 2017

Change marko-devtools to marko-cli.

  • Update test accordingly.
  • Update syntax to ES6.

I have problem on renderResult.$() when it runs on browser. I got

1) components/color-picker/components/color-picker-header
       color-picker-header color:
     AssertionError: object tested must be an array, an object, or a string, but undefined given
      at Object.module.exports [as expectTypes] (static/browser-tests-runner/chai$3.5.0/lib/chai/utils/expectTypes.js:38:11)
      at Assertion.include (static/browser-tests-runner/chai$3.5.0/lib/chai/core/assertions.js:206:7)
      at Assertion.assert (static/browser-tests-runner/chai$3.5.0/lib/chai/utils/addChainableMethod.js:84:49)
      at Context.<anonymous> (static/browser-tests-runner/marko-color-picker$0.0.3/components/color-picker/components/color-picker-header/test.js:9:44)
      at Context.<anonymous> (static/browser-tests-runner/@marko/test$1.0.2/util/browser-tests-runner/setup.js:33:34)

However, it works when you run the test on the server, so I have to rename rendering test to test.server.js

To make the click testing work, you have to run it on browser so I have to use renderResult.component.el which will get the DOM element of the component. Once I get the DOM, I can click it or assert the class list for the rendering test.

TBH, I'm not sure if this is recommended pattern on using marko-cli. Any thoughts?

Update test accordingly.
Update syntax to ES6.
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