X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Fdb%2Fschema-version-helper.js;fp=test%2Fsrc%2Fdb%2Fschema-version-helper.js;h=4a95202c85ec90d7c4594148440b2606df9ad9e5;hb=71587de3ea9839d14d9f7bffa6c1db19e52dd9b5;hp=b69735e3400a758b9d569bc8e9f4cfadd3ef0ef8;hpb=749801f9983b087aee6844ee5fa0f0a7419ec5db;p=websub-hub diff --git a/test/src/db/schema-version-helper.js b/test/src/db/schema-version-helper.js index b69735e..4a95202 100644 --- a/test/src/db/schema-version-helper.js +++ b/test/src/db/schema-version-helper.js @@ -121,6 +121,7 @@ describe('SchemaVersionHelper', function () { .onCall(i++).returns(notDir) // 'init.sql' .onCall(i++).returns(isDir).onCall(i++).returns(isMig) // '1.0.1' .onCall(i++).returns(isDir).onCall(i++).returns(isMig) // '1.0.0' + ; const result = svh.allSchemaVersions('path'); assert.deepStrictEqual(result, expected); }); @@ -137,7 +138,7 @@ describe('SchemaVersionHelper', function () { max: { major: 1, minor: 1, patch: 1 }, }; current = { major: 1, minor: 0, patch: 1 }; - }); + }); it('covers', function () { const expected = ['1.1.0', '1.1.1']; fs.readdirSync.returns(['1.1.2', 'file.txt', '1.1.0', '1.1.1', 'init.sql', '1.0.1', '1.0.0']); @@ -151,6 +152,7 @@ describe('SchemaVersionHelper', function () { .onCall(i++).returns(notDir) // 'init.sql' .onCall(i++).returns(isDir).onCall(i++).returns(isMig) // '1.0.1' .onCall(i++).returns(isDir).onCall(i++).returns(isMig) // '1.0.0' + ; const result = svh.unappliedSchemaVersions('path', current, supported); assert.deepStrictEqual(result, expected); });