Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/gitpod-protocol/src/messaging/error.spec.ts
2500 views
1
/**
2
* Copyright (c) 2021 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { suite, test } from "@testdeck/mocha";
8
import { ApplicationError, ErrorCodes } from "./error";
9
10
import { expect } from "chai";
11
12
@suite
13
class TestApplicationError {
14
@test public async ApplicationError_isUserDeletedError() {
15
expect(
16
ApplicationError.isUserDeletedError(
17
new ApplicationError(ErrorCodes.NOT_FOUND, "not found", { userDeleted: true }),
18
),
19
).to.be.true;
20
}
21
}
22
module.exports = new TestApplicationError();
23
24