-
-
Save ryaninvents/4863cb2ce490617f0481482eb9e95205 to your computer and use it in GitHub Desktop.
mocha+chai+budo+nightmare
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
"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