Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a571bba90 | |||
bcb66b2ccf |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@pushrocks/smartfile",
|
||||
"version": "9.0.4",
|
||||
"version": "9.0.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartfile",
|
||||
"version": "9.0.4",
|
||||
"version": "9.0.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartfile",
|
||||
"private": false,
|
||||
"version": "9.0.4",
|
||||
"version": "9.0.5",
|
||||
"description": "offers smart ways to work with files in nodejs",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
|
@ -213,4 +213,8 @@ tap.test('should create, store and retrieve valid smartfiles', async () => {
|
||||
expect(retrievedString).to.equal(fileString);
|
||||
});
|
||||
|
||||
tap.test('should wait for file to be ready', async () => {
|
||||
await smartfile.fs.waitForFileToBeReady('./test/testassets/mytest.json')
|
||||
})
|
||||
|
||||
tap.start();
|
||||
|
@ -388,7 +388,7 @@ export const waitForFileToBeReady = async (filePathArg: string): Promise<void> =
|
||||
limitedArray.addOne(stats.size);
|
||||
if (
|
||||
limitedArray.array.length < 3 ||
|
||||
!(limitedArray.array[0] === limitedArray[1] && limitedArray.array[1] === limitedArray[2])
|
||||
!(limitedArray.array[0] === limitedArray.array[1] && limitedArray.array[1] === limitedArray.array[2])
|
||||
) {
|
||||
await plugins.smartdelay.delayFor(5000);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user