Skip to content

Commit

Permalink
Fix vitest compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Jan 27, 2025
1 parent e311ff7 commit beb46d7
Show file tree
Hide file tree
Showing 39 changed files with 56 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/a2p.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import path from "path";
import dotenv from "dotenv-override-true";
import DebugExtension from "@rc-ex/debug";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

dotenv.config({ path: path.join(__dirname, ".env.a2p") });
Expand Down
2 changes: 2 additions & 0 deletions test/address-book.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("Address Book", () => {
Expand Down
1 change: 1 addition & 0 deletions test/authorize-uri-extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import RingCentral from "@rc-ex/core";
import AuthorizeUriExtension from "@rc-ex/authorize-uri";
import { describe, expect, test } from "vitest";

describe("Authorize URI Extension", () => {
test("default", async () => {
Expand Down
1 change: 1 addition & 0 deletions test/authorize.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, test } from "vitest";
import ReusableRestClient from "./reusable-rest-client";

describe("authorize", () => {
Expand Down
1 change: 1 addition & 0 deletions test/auto-refresh-extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AutoRefreshExtension from "@rc-ex/auto-refresh";
import waitFor from "wait-for-async";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
2 changes: 2 additions & 0 deletions test/batch-get.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("batch get", () => {
Expand Down
1 change: 1 addition & 0 deletions test/call-log.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// import winston from 'winston';
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
1 change: 1 addition & 0 deletions test/debug-extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import DebugExtension from "@rc-ex/debug";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
1 change: 1 addition & 0 deletions test/download-fax.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import fs from "fs";
import path from "path";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
1 change: 1 addition & 0 deletions test/events-extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import EventsExtension, { Events } from "@rc-ex/events";
import Utils from "@rc-ex/core/src/Utils";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
1 change: 1 addition & 0 deletions test/exceptions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { RestResponse } from "@rc-ex/core/src/types";
import RestException from "@rc-ex/core/src/RestException";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
1 change: 1 addition & 0 deletions test/extension-info.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, test } from "vitest";
import ReusableRestClient from "./reusable-rest-client";

describe("HTTP GET", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/fax-cover-pages.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("fax cover pages", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/fax-fail-reason.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("fax fail reason", () => {
Expand Down
1 change: 1 addition & 0 deletions test/fax.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type FaxResponse from "@rc-ex/core/src/definitions/FaxResponse";
import Utils from "@rc-ex/core/src/Utils";
import fs from "fs";
import path from "path";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
2 changes: 2 additions & 0 deletions test/forward-all-company-calls.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("Forward all company calls", () => {
Expand Down
1 change: 1 addition & 0 deletions test/list-meetings.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// import ReusableRestClient from './reusable-rest-client';
import { describe, expect, test } from "vitest";

describe("list meetings", () => {
test("default", async () => {
Expand Down
1 change: 1 addition & 0 deletions test/low-level-api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type FaxResponse from "@rc-ex/core/src/definitions/FaxResponse";
import type GetSMSMessageInfoResponse from "@rc-ex/core/src/definitions/GetSMSMessageInfoResponse";
import fs from "fs";
import path from "path";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
2 changes: 2 additions & 0 deletions test/manage-token.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("manage token", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/message-store.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("message store", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/mms.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type CreateMMSMessage from "@rc-ex/core/src/definitions/CreateMMSMessage"
import type Attachment from "@rc-ex/core/src/definitions/Attachment";
import fs from "fs";
import path from "path";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("mms", () => {
Expand Down
1 change: 1 addition & 0 deletions test/multiple-extensions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import waitFor from "wait-for-async";
import RingCentral from "@rc-ex/core";
import RcSdkExtension from "@rc-ex/rcsdk";
import WebSocketExtension from "@rc-ex/ws";
import { describe, expect, test } from "vitest";

// dotenv.config({path: path.join(__dirname, '.env.lab')});

Expand Down
2 changes: 2 additions & 0 deletions test/profile-image.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import fs from "fs";
import path from "path";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("Profile image", () => {
Expand Down
1 change: 1 addition & 0 deletions test/rcsdk-extension/default.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import RingCentral from "@rc-ex/core";
import RcSdkExtension from "@rc-ex/rcsdk";
import { SDK } from "@ringcentral/sdk";
import { describe, expect, test } from "vitest";

describe("RingCentral extension", () => {
test("default", async () => {
Expand Down
1 change: 1 addition & 0 deletions test/reusable-rest-client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import RingCentral from "@rc-ex/core";
import { describe, expect, test } from "vitest";

class ReusableRestClient {
private static rc: RingCentral;
Expand Down
1 change: 1 addition & 0 deletions test/schedule-meeting.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// } from '@rc-ex/core/src/definitions';

// import {createRingCentral} from './utils';
import { describe, expect, test } from "vitest";

// meetings has been replaced by RCV
describe("schedule meeting", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/sms.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("SMS", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/update-extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("Update extension", () => {
Expand Down
1 change: 1 addition & 0 deletions test/upload-ivr-audio.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from "fs";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

Expand Down
2 changes: 2 additions & 0 deletions test/v2.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest";

import ReusableRestClient from "./reusable-rest-client";

describe("SMS", () => {
Expand Down
1 change: 0 additions & 1 deletion test/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
globals: true,
environment: "node", // Test environment
setupFiles: "dotenv-override-true/config", // Optional setup file
maxWorkers: 1,
Expand Down
2 changes: 2 additions & 0 deletions test/ws-extension/auto-recover.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import WebSocketExtension from "@rc-ex/ws";
import waitFor from "wait-for-async";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";

describe("WebSocket", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/ws-extension/empty-response.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import WebSocketExtension from "@rc-ex/ws";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";

describe("WebSocket", () => {
Expand Down
1 change: 1 addition & 0 deletions test/ws-extension/event-emitter.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import WebSocketExtension, { Events } from "@rc-ex/ws";
import waitFor from "wait-for-async";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";

Expand Down
2 changes: 2 additions & 0 deletions test/ws-extension/init.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import WebSocketExtension from "@rc-ex/ws";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";

describe("WebSocket", () => {
Expand Down
1 change: 1 addition & 0 deletions test/ws-extension/override-ping-server.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import WebSocketExtension from "@rc-ex/ws";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";
// import waitFor from 'wait-for-async';
Expand Down
1 change: 1 addition & 0 deletions test/ws-extension/rest-over-ws.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import WebSocketExtension from "@rc-ex/ws";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";
// import path from 'path';
Expand Down
2 changes: 2 additions & 0 deletions test/ws-extension/session-recovery.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import WebSocketExtension from "@rc-ex/ws";
import waitFor from "wait-for-async";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";

describe("WebSocket session recovery", () => {
Expand Down
2 changes: 2 additions & 0 deletions test/ws-extension/subscription.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import WebSocketExtension from "@rc-ex/ws";
import waitFor from "wait-for-async";
import { describe, expect, test } from "vitest";

import ReusableRestClient from "../reusable-rest-client";
// import path from 'path';
// import dotenv from 'dotenv-override-true';
Expand Down

0 comments on commit beb46d7

Please sign in to comment.