-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isolate runner's logic from entry-point
- Loading branch information
Showing
2 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,5 @@ | ||
#!/usr/local/bin/node --es_staging | ||
"use strict"; | ||
|
||
/** Bring on a real test-runner */ | ||
const Mocha = require("mocha"); | ||
const Chai = require("chai"); | ||
Chai.should(); | ||
|
||
|
||
/** Check if an element contains one or more CSS classes */ | ||
Chai.Assertion.addMethod("class", function(classNames){ | ||
const subject = Chai.util.flag(this, "object"); | ||
const classList = subject.classList; | ||
|
||
if(!Array.isArray(classNames)) | ||
classNames = classNames.split(/\s+/g); | ||
|
||
for(let name of classNames){ | ||
this.assert( | ||
classList.contains(name), | ||
"expected classList '" + subject.className + "' to include #{exp}", | ||
"expected classList '" + subject.className + "' not to include #{exp}", | ||
name | ||
); | ||
} | ||
}); | ||
|
||
|
||
/** Connect Atom to our test runner */ | ||
module.exports = require("../lib/main.js"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters