Last active
March 30, 2017 16:07
-
-
Save sombriks/4d8ab3cc481cdb312a24a725e893a6e9 to your computer and use it in GitHub Desktop.
mocha+chai+budo+nightmare
This file contains hidden or 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
"use strict" | |
const Nightmare = require("nightmare"); | |
const expect = require("chai").expect; | |
const budo = require("budo"); | |
describe("\u263C basic tests \u263E", () => { | |
const b = budo("../src/main.js"); | |
it("should check document title", (done) => { | |
Nightmare().goto("http://127.0.0.1:9966") | |
.wait("#mount").evaluate(() => { | |
return document.title; | |
}).end().then((result) => { | |
expect(result).to.equal("BTT"); | |
done(); | |
}); | |
}); | |
it("should close test server", (done) => { | |
b.close(); | |
done(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment