@@ -10,7 +10,7 @@ import nord from '../src/themes/nord.mjs'
1010
1111describe ( 'should' , ( ) => {
1212 it ( 'works' , async ( ) => {
13- const shiki = await createHighlighterCore ( {
13+ using shiki = await createHighlighterCore ( {
1414 themes : [ nord ] ,
1515 langs : [ js ] ,
1616 loadWasm : {
@@ -23,7 +23,7 @@ describe('should', () => {
2323 } )
2424
2525 it ( 'dynamic load theme and lang' , async ( ) => {
26- const shiki = await createHighlighterCore ( {
26+ using shiki = await createHighlighterCore ( {
2727 themes : [ nord ] ,
2828 langs : [
2929 js ,
@@ -61,7 +61,7 @@ describe('should', () => {
6161 } )
6262
6363 it ( 'requires nested lang' , async ( ) => {
64- const shiki = await createHighlighterCore ( {
64+ using shiki = await createHighlighterCore ( {
6565 themes : [ nord ] ,
6666 langs : [
6767 import ( '../src/langs/cpp.mjs' ) ,
@@ -84,7 +84,7 @@ describe('should', () => {
8484 } )
8585
8686 it ( 'works without no initial langs and themes' , async ( ) => {
87- const shiki = await createHighlighterCore ( )
87+ using shiki = await createHighlighterCore ( )
8888
8989 await shiki . loadLanguage ( js )
9090 await shiki . loadTheme ( nord )
@@ -95,7 +95,7 @@ describe('should', () => {
9595 } )
9696
9797 it ( 'works with alias' , async ( ) => {
98- const shiki = await createHighlighterCore ( {
98+ using shiki = await createHighlighterCore ( {
9999 langAlias : {
100100 mylang : 'javascript' ,
101101 mylang2 : 'js' , // nested alias
@@ -112,7 +112,7 @@ describe('should', () => {
112112 } )
113113
114114 it ( 'works with alias override' , async ( ) => {
115- const shiki = await createHighlighterCore ( {
115+ using shiki = await createHighlighterCore ( {
116116 langAlias : {
117117 js : 'typescript' ,
118118 } ,
@@ -128,7 +128,7 @@ describe('should', () => {
128128
129129describe ( 'errors' , ( ) => {
130130 it ( 'throw on invalid theme' , async ( ) => {
131- const shiki = await createHighlighterCore ( {
131+ using shiki = await createHighlighterCore ( {
132132 themes : [ nord ] ,
133133 langs : [ js as any ] ,
134134 } )
@@ -138,7 +138,7 @@ describe('errors', () => {
138138 } )
139139
140140 it ( 'throw on invalid lang' , async ( ) => {
141- const shiki = await createHighlighterCore ( {
141+ using shiki = await createHighlighterCore ( {
142142 themes : [ nord ] ,
143143 langs : [ js as any ] ,
144144 } )
@@ -148,7 +148,7 @@ describe('errors', () => {
148148 } )
149149
150150 it ( 'highlight with raw theme registation' , async ( ) => {
151- const shiki = await createHighlighterCore ( {
151+ using shiki = await createHighlighterCore ( {
152152 themes : [ nord ] ,
153153 langs : [ js as any ] ,
154154 loadWasm : {
@@ -169,7 +169,7 @@ describe('errors', () => {
169169 } )
170170
171171 it ( 'throw on circular alias' , async ( ) => {
172- const shiki = await createHighlighterCore ( {
172+ using shiki = await createHighlighterCore ( {
173173 langAlias : {
174174 mylang : 'mylang2' ,
175175 mylang2 : 'mylang' ,
@@ -184,7 +184,7 @@ describe('errors', () => {
184184 } )
185185
186186 it ( 'throw on using disposed instance' , async ( ) => {
187- const shiki = await createHighlighterCore ( {
187+ using shiki = await createHighlighterCore ( {
188188 themes : [ nord ] ,
189189 langs : [ js as any ] ,
190190 } )
0 commit comments