punchcard-cms / punchcard

The Punchcard CMS
Apache License 2.0
31 stars 19 forks source link

Core Developer: Testing browser javascripts #152

Open ayush2k opened 8 years ago

ayush2k commented 8 years ago

As a Core Developer I want a clear and repeatable way to test javascripts for the browser so that my browser javascripts are tested and confirmed as functional.

Feature: Testing browser javascripts
  As a Core Developer
  I want a clear and repeatable way to test javascripts for the browser
  So that my browser javascripts are tested and confirmed as functional.

  Scenario: Javascript requires a DOM
    Given that I have javascript code that needs to get data from a dom
    When I need to test my javascript code
    Then I want my tests to create a mock DOM
      And I want that mock DOM to properly emulate an actual browser's DOM.

  Scenario: Javascript has events
    Given that I have javascript code that handles events on DOM
    When I need to test my javascript code
    Then I want my tests to trigger events
      And I want to test the functionality of event handling functions.

mattgrill commented 7 years ago

@Snugug https://github.com/segmentio/nightmare

mattgrill commented 7 years ago

@Snugug https://github.com/acquia/waterwheel-js/blob/master/test/build.js