mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix watch node test on MacOS/ARM
This commit is contained in:
parent
b0d9903fe2
commit
1d547500e8
@ -15,11 +15,14 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
var fs = require("fs-extra");
|
var fs = require("fs-extra");
|
||||||
|
var os = require("os");
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
var should = require("should");
|
var should = require("should");
|
||||||
var helper = require("node-red-node-test-helper");
|
var helper = require("node-red-node-test-helper");
|
||||||
var watchNode = require("nr-test-utils").require("@node-red/nodes/core/storage/23-watch.js");
|
var watchNode = require("nr-test-utils").require("@node-red/nodes/core/storage/23-watch.js");
|
||||||
|
|
||||||
|
var arch = os.arch();
|
||||||
|
var platform = os.platform();
|
||||||
|
|
||||||
describe('watch Node', function() {
|
describe('watch Node', function() {
|
||||||
this.timeout(5000);
|
this.timeout(5000);
|
||||||
@ -89,8 +92,11 @@ describe('watch Node', function() {
|
|||||||
msg.should.have.property('payload', result.payload);
|
msg.should.have.property('payload', result.payload);
|
||||||
msg.should.have.property('type', result.type);
|
msg.should.have.property('type', result.type);
|
||||||
if('size' in result) {
|
if('size' in result) {
|
||||||
|
if (!((arch != "arm64") && (platform !== "darwin"))) {
|
||||||
|
// On OSX/ARM, two change events occur and first event do not reflect file size change. So ignore size field in the case.
|
||||||
msg.should.have.property('size', result.size);
|
msg.should.have.property('size', result.size);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
count++;
|
count++;
|
||||||
if(count === len) {
|
if(count === len) {
|
||||||
n1.close();
|
n1.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user