1
1
import React from 'react' ;
2
2
import { render , screen } from '@testing-library/preact' ;
3
3
import BookDetailsLoader from './book-details-context' ;
4
- import { MemoryRouter } from 'react-router-dom' ;
5
4
import ResourceBoxes from '~/pages/details/common/resource-box/resource-boxes' ;
6
5
import {
7
6
instructorResourceBoxPermissions ,
8
7
studentResourceBoxPermissions
9
8
} from '~/pages/details/common/resource-box/resource-box' ;
9
+ import { test , expect } from '@jest/globals' ;
10
10
11
11
// Test all the conditions in here:
12
12
// userStatus: isInstructor: true|false
@@ -25,17 +25,15 @@ const userStatus = {
25
25
} ;
26
26
const payload = {
27
27
heading : 'This is the heading' ,
28
- description : 'This is <b>a description</b> in HTML' ,
29
- }
28
+ description : 'This is <b>a description</b> in HTML'
29
+ } ;
30
30
31
31
function LangWrapResourceBoxes ( { models} ) {
32
32
// console.info('*** MODELS', models);
33
33
return (
34
- < MemoryRouter initialEntries = { [ '/details/books/sometitle?Instructor%20resources' ] } >
35
- < BookDetailsLoader slug = 'books/college-algebra' >
36
- < ResourceBoxes models = { models } />
37
- </ BookDetailsLoader >
38
- </ MemoryRouter >
34
+ < BookDetailsLoader slug = 'books/college-algebra' >
35
+ < ResourceBoxes models = { models } />
36
+ </ BookDetailsLoader >
39
37
) ;
40
38
}
41
39
0 commit comments