File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ describe("Test request method", () => {
1313 process . env . token == undefined ||
1414 process . env . token_secret == undefined ||
1515 process . env . realm == undefined ||
16- process . env . base_url == undefined ||
17- process . env . restlet_url == undefined
16+ process . env . base_url == undefined
17+ // || process.env.restlet_url == undefined
1818 ) {
1919 throw new Error ( "Please create a `.env` file based on `.env.sample`" ) ;
2020 }
Original file line number Diff line number Diff line change 1+ import { describe , expect , it } from "vitest" ;
2+ import { removeLeadingSlash , removeTrailingSlash } from "../src/utils.js" ;
3+
4+
5+ describe ( "Test Utilities" , ( ) => {
6+
7+ it ( "it should properly remove a trailing slash" , ( ) => {
8+ const original = 'https://example.com/' ;
9+ const fixed = 'https://example.com' ;
10+ expect ( removeTrailingSlash ( original ) ) . toEqual ( fixed ) ;
11+ } ) ;
12+
13+ it ( "it should properly remove a leading slash" , ( ) => {
14+ const original = '/path/to/something' ;
15+ const fixed = 'path/to/something' ;
16+ expect ( removeLeadingSlash ( original ) ) . toEqual ( fixed ) ;
17+ } ) ;
18+ } ) ;
You can’t perform that action at this time.
0 commit comments