simple-dir.js 551 B

1234567891011121314151617181920
  1. casper.test.begin('Simple Directive', 3, function (test) {
  2. casper
  3. .start('./fixtures/simple-dir.html')
  4. .then(function () {
  5. test.assertSelectorHasText('.one', 'bind', 'object definition bind')
  6. test.assertSelectorHasText('.two', 'bind', 'function definition bind')
  7. })
  8. .thenEvaluate(function () {
  9. /* global a */
  10. a.$destroy()
  11. })
  12. .then(function () {
  13. test.assertSelectorHasText('.one', 'unbind', 'object definition unbind')
  14. })
  15. .run(function () {
  16. test.done()
  17. })
  18. })