mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Update to latest sinon
This commit is contained in:
@@ -65,7 +65,7 @@ describe("runtime/library/examples", function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
sinon.stub(fs,"readFile", function(path,opts,callback) {
|
||||
sinon.stub(fs,"readFile").callsFake(function(path,opts,callback) {
|
||||
if (path === "/tmp/test-module/abc") {
|
||||
callback(null,"Example flow result");
|
||||
} else if (path === "/tmp/@scope/test-module/abc") {
|
||||
|
@@ -37,14 +37,14 @@ var mockLog = {
|
||||
|
||||
describe("runtime/library", function() {
|
||||
before(function() {
|
||||
sinon.stub(localLibrary,"getEntry",function(type,path) {
|
||||
sinon.stub(localLibrary,"getEntry").callsFake(function(type,path) {
|
||||
return Promise.resolve({
|
||||
library: "local",
|
||||
type:type,
|
||||
path:path
|
||||
})
|
||||
});
|
||||
sinon.stub(localLibrary,"saveEntry",function(type, path, meta, body) {
|
||||
sinon.stub(localLibrary,"saveEntry").callsFake(function(type, path, meta, body) {
|
||||
return Promise.resolve({
|
||||
library: "local",
|
||||
type:type,
|
||||
@@ -53,7 +53,7 @@ describe("runtime/library", function() {
|
||||
body:body
|
||||
})
|
||||
});
|
||||
sinon.stub(examplesLibrary,"getEntry",function(type,path) {
|
||||
sinon.stub(examplesLibrary,"getEntry").callsFake(function(type,path) {
|
||||
return Promise.resolve({
|
||||
library: "_examples_",
|
||||
type:type,
|
||||
|
Reference in New Issue
Block a user