Update to latest sinon

This commit is contained in:
Nick O'Leary
2021-04-09 11:22:57 +01:00
parent 9882582903
commit 877c463494
40 changed files with 254 additions and 254 deletions

View File

@@ -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") {

View File

@@ -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,