From 02ea64c7af8ad3b6205942d0a1c52351b8312be7 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Thu, 2 Aug 2018 09:55:11 +0100 Subject: [PATCH] test: make files.ls results ordering consistent Previously we'd get files in different orders between `files.ls()` and `files.ls({long: true})` due to a bug in `go-ipfs` (see ipfs/go-ipfs#5181) Since this has been resolved we can now expect consistent ordering. --- js/src/files/ls.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/files/ls.js b/js/src/files/ls.js index 17618739c..ff7fd4d06 100644 --- a/js/src/files/ls.js +++ b/js/src/files/ls.js @@ -54,8 +54,8 @@ module.exports = (createCommon, options) => { ipfs.files.ls(testDir, (err, info) => { expect(err).to.not.exist() expect(info).to.eql([ - { name: 'b', type: 0, size: 0, hash: '' }, - { name: 'lv1', type: 0, size: 0, hash: '' } + { name: 'lv1', type: 0, size: 0, hash: '' }, + { name: 'b', type: 0, size: 0, hash: '' } ]) done() })