am-lunch-test

test

Stats

StarsIssuesVersionUpdatedCreatedSize
am-lunch-test
1.1.35 years ago5 years agoMinified + gzip package size for am-lunch-test in KB

Readme

am-lunch-test

Test development using parameters. this is renamed am-lunch-time

sample code

testListPage.html

<test-list></test-list>
<script src="./testListPage.js">

testListPage.coffee

generate = require("am-lunch-test/browser/generate")
testcases =
  clickTest:
    click1: "?click1"
    click2: "?click2"
  apiTest:
    api1: "?api1"
    api2:
      newApi1: "?api2&newApi=0"
      newApi2: "?api2&newApi=1"
generate(testcases)

link pages

This module watch event of console.assert.
It will end result in an error at the time of console.assert() is false.
All passed the test by putting the console.info after it was true ( "finished").

sample

if location.search is "?click1"
  console.assert(1 + 1)
  console.assert(1 - 1, "error")
  console.info("finished")
else location.search is "?click2"
  console.assert(1 + 0)
  console.assert(1 - 0, "error")
  console.info("finished")

use Test class with am-autoevent

Test = require("am-lunch-test")
class NewTest extends Test

newTest = new NewTest
autoEvent = Test::AutoEvent

newTest.start(
  init: =>
    @autoEvent = new @AutoEvent
    @autoEvent.register()
  click: (selector) =>
    @autoEvent.wait(100).click(selector)
  addEvent: (numStr) =>
    @autoEvent.wait(100).addEvent(=>
      num = parseInt(numStr)
      console.assert(num)
    )
)

autoEvent.start()

API

TODO

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.