1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { parseKeepManifestText } from "./collection-manifest-parser";
6 import { mapManifestToFiles, mapManifestToDirectories } from "./collection-manifest-mapper";
8 test('mapManifestToFiles', () => {
9 const manifestText = `. 930625b054ce894ac40596c3f5a0d947+33 0:0:a 0:0:b 0:33:output.txt\n./c d41d8cd98f00b204e9800998ecf8427e+0 0:0:d`;
10 const manifest = parseKeepManifestText(manifestText);
11 const files = mapManifestToFiles(manifest);
12 expect(files).toEqual([{
39 test('mapManifestToDirectories', () => {
40 const manifestText = `./c/user/results 930625b054ce894ac40596c3f5a0d947+33 0:0:a 0:0:b 0:33:output.txt\n`;
41 const manifest = parseKeepManifestText(manifestText);
42 const directories = mapManifestToDirectories(manifest);
43 expect(directories).toEqual([{
55 id: '/c/user/results',