File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,7 @@ export const sveltekitViteConfig = {
8
8
] ,
9
9
ssr : {
10
10
external : [ '@babel/core' , 'babel-plugin-precompile-intl' ]
11
- } ,
12
- // resolve: {
13
- // alias: {
14
- // $lib: path.resolve('./src/lib'),
15
- // },
16
- // },
11
+ } ,
17
12
}
18
13
19
14
/** @type {import('@sveltejs/kit').Config } */
Original file line number Diff line number Diff line change 1
1
import { cleanup , render } from '@testing-library/svelte'
2
2
import DefinitionEntry from '$lib/DefinitionEntry.svelte' ;
3
+ import chai from 'chai' ;
4
+ import chaiDom from 'chai-dom' ;
5
+
6
+ chai . use ( chaiDom ) ;
3
7
4
8
describe ( 'DefinitionEntry.svelte' , ( ) => {
5
9
// TODO: @testing -library/svelte claims to add this automatically but it doesn't work without explicit afterEach
6
10
afterEach ( ( ) => cleanup ( ) )
7
11
8
12
it ( 'renders a link with the given href' , ( ) => {
9
13
const { getByTestId } = render ( DefinitionEntry , { background : 'gray' } )
10
- console . log ( "getByTestId('definition-entry')" , getByTestId ( 'definition-entry' ) ) ;
11
- console . log ( "to.have->" , expect ( getByTestId ( 'definition-entry' ) ) . to . have ) ;
12
- console . log ( "to.have.class->" , expect ( getByTestId ( 'definition-entry' ) ) . to . have . class ) ;
13
- debugger ;
14
14
expect ( getByTestId ( 'definition-entry' ) ) . to . have . class ( 'bg-gray-50' ) ;
15
15
} ) ;
16
16
} ) ;
You can’t perform that action at this time.
0 commit comments