File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ test("renders loading page", () => {
31
31
expect ( screen . queryByText ( / L a u n c h i n g y o u r B i n d e r / ) ) . toBeInTheDocument ( ) ;
32
32
} ) ;
33
33
34
- test ( "renders loading page with trailign slash" , ( ) => {
34
+ test ( "renders loading page with trailing slash" , ( ) => {
35
35
const { hook } = memoryLocation ( { path : "/v2/gh/user/repo/main/" } ) ;
36
36
render ( < App routerHook = { hook } /> ) ;
37
37
expect ( screen . queryByText ( / L a u n c h i n g y o u r B i n d e r / ) ) . toBeInTheDocument ( ) ;
@@ -40,9 +40,11 @@ test("renders loading page with trailign slash", () => {
40
40
test ( "renders error for misconfigured repo" , ( ) => {
41
41
const { hook } = memoryLocation ( { path : "/v2/gh/userrep/main/" } ) ;
42
42
render ( < App routerHook = { hook } /> ) ;
43
- expect (
44
- screen . queryByText (
45
- / S p e c f o r t h i s p r o v i d e r s h o u l d m a t c h .+ \/ .+ \/ .+ , p r o v i d e d : " u s e r r e p o \/ m a i n " / ,
46
- ) ,
47
- ) . toBeInTheDocument ( ) ;
43
+ expect ( screen . queryByText ( / N o t F o u n d / ) ) . toBeInTheDocument ( ) ;
44
+ } ) ;
45
+
46
+ test ( "renders loading page with trailing slash" , ( ) => {
47
+ const { hook } = memoryLocation ( { path : "/v2/zenodo/10.5281/zenodo.3242074/" } ) ;
48
+ render ( < App routerHook = { hook } /> ) ;
49
+ expect ( screen . queryByText ( / L a u n c h i n g y o u r B i n d e r / ) ) . toBeInTheDocument ( ) ;
48
50
} ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ window.pageConfig = {
27
27
} ,
28
28
displayName : "GitHub" ,
29
29
id : "gh" ,
30
- spec : { validateRegex : / .+ \/ .+ \/ .+ / } ,
30
+ spec : { validateRegex : " .+\\ /.+\\ /.+" } ,
31
31
ref : {
32
32
default : "HEAD" ,
33
33
enabled : true ,
@@ -41,7 +41,7 @@ window.pageConfig = {
41
41
{
42
42
displayName : "Zenodo DOI" ,
43
43
id : "zenodo" ,
44
- spec : { validateRegex : / 1 0 \. \ d+ \/ ( .) + / } ,
44
+ spec : { validateRegex : " 10\\.\\ d+\\ /(.)+" } ,
45
45
ref : {
46
46
enabled : false ,
47
47
} ,
You can’t perform that action at this time.
0 commit comments