Path: blob/main/components/gitpod-protocol/src/snapshot-url.spec.ts
2498 views
/**1* Copyright (c) 2020 Gitpod GmbH. All rights reserved.2* Licensed under the GNU Affero General Public License (AGPL).3* See License.AGPL.txt in the project root for license information.4*/56import { suite, test } from "@testdeck/mocha";7import * as chai from "chai";8import { SnapshotUrl } from ".";910const expect = chai.expect;1112@suite13class TestSnapshotUrlParser {14@test public testPositive() {15const actual = SnapshotUrl.parse(16"workspaces/c362d434-6faa-4ce0-9ad4-91b4a87c4abe/3f0556f7-4afa-11e9-98d5-52f8983b9279.tar@gitpod-prodcopy-user-e1e28f18-0354-4a5d-b6b4-8879a2ff73fd",17);1819expect(actual).to.deep.equal(<SnapshotUrl>{20bucketId: "gitpod-prodcopy-user-e1e28f18-0354-4a5d-b6b4-8879a2ff73fd",21filename: "3f0556f7-4afa-11e9-98d5-52f8983b9279.tar",22fullPath: "workspaces/c362d434-6faa-4ce0-9ad4-91b4a87c4abe/3f0556f7-4afa-11e9-98d5-52f8983b9279.tar",23});24}25}26module.exports = new TestSnapshotUrlParser(); // Only to circumvent no usage warning :-/272829