Skip to content

MeatballIndustries/enyo-assertions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assertions

EnyoJS wrapper for the Chai.js assertion library

Why?

Abstracts the enyo.TestSuite finish() method into this.assert or this.expect calls (similar to the Test Package Wishlist)

Usage

Assert

enyo.kind({
  name: 'TestSuiteAssert',
  kind: 'phated.Assertions',

  testAssert: function(){
    var foo = 'bar';
    this.assert(foo == 'bar', "expected foo to equal `bar`");
  }
});

or

Expect

enyo.kind({
  name: 'TestSuiteExpect',
  kind: 'phated.Assertions',

  testTrue: function(){
    this.expect(true).to.be.true;
    this.expect(false).to.not.be.true;
    this.expect(1).to.not.be.true;
  }
})

Dependencies

This library is dependent on enyo.TestSuite in $lib/extra/test

Tests

Tests can be found in the test directory. They consist of the tests used to test the Chai assertion library written as an Enyo kind. To run them, just open TestRunner.html in your browser.

Build

Install Grunt (npm install -g grunt) and run the grunt command in this directory

License

MIT

About

Chai.js assertion integration with EnyoJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%