mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 00:23:12 +09:00
test cleanup
This commit is contained in:
1 parent
6e95c86fb1
commit
d9e897836b
2 files changed
+1
-22
No files matched your search
@@ -1,27 +1,6 @@
|
|||||||
const sinon = require("sinon");
|
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
const libomega = require('./libomega');
|
const libomega = require('./libomega');
|
||||||
/*
|
|
||||||
describe('The webpage module', function () {
|
|
||||||
it('saves the content', function * () {
|
|
||||||
const url = 'google.com'
|
|
||||||
const content = '<h1>title</h1>'
|
|
||||||
const writeFileStub = this.sandbox.stub(fs, 'writeFile', function (filePath, fileContent, cb) {
|
|
||||||
cb(null)
|
|
||||||
})
|
|
||||||
|
|
||||||
const requestStub = this.sandbox.stub(request, 'get', function (url, cb) {
|
|
||||||
cb(null, null, content)
|
|
||||||
})
|
|
||||||
|
|
||||||
const result = yield webpage.saveWebpage(url)
|
|
||||||
|
|
||||||
expect(writeFileStub).to.be.calledWith()
|
|
||||||
expect(requestStub).to.be.calledWith(url)
|
|
||||||
expect(result).to.eql('page')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
describe("libomega.js", function(){
|
describe("libomega.js", function(){
|
||||||
describe("libomega.clone", function(){
|
describe("libomega.clone", function(){
|
||||||
it("clones javascript objects", function(){
|
it("clones javascript objects", function(){
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"main": "master.js",
|
"main": "master.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run test-unit",
|
"test": "npm run test-unit",
|
||||||
"test-unit": "SET NODE_ENV=test && mocha *.spec.js",
|
"test-unit": "SET NODE_ENV=test && mocha --recursive ./**/*.spec.js",
|
||||||
"start": "echo Run node client.js start [instance] to start slaves && node master.js"
|
"start": "echo Run node client.js start [instance] to start slaves && node master.js"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Reference in new issue
Block a user