1- import {
2- assertEquals ,
3- assertThrowsAsync ,
4- } from "https://deno.land/[email protected] /testing/asserts.ts" ; 1+ import { assertEquals , assertThrows } from "jsr:@std/assert" ;
52
63import { CssGridModule } from "./../../../src/modules/css-grid.js" ;
74
@@ -26,15 +23,15 @@ Deno.test("CssGridModule.create - should return grid with specified column and r
2623} ) ;
2724
2825Deno . test ( "CssGridModule.create - should throw an error if columnCount is not a number" , async ( ) => {
29- await assertThrowsAsync (
26+ await assertThrows (
3027 ( ) => CssGridModule . create ( { columnCount : "invalid" } ) ,
3128 Error ,
3229 'CssGridModule.create: Argument "columnCount" should be of type "number"' ,
3330 ) ;
3431} ) ;
3532
3633Deno . test ( "CssGridModule.create - should throw an error if rowCount is not a number" , async ( ) => {
37- await assertThrowsAsync (
34+ await assertThrows (
3835 ( ) => CssGridModule . create ( { rowCount : "invalid" } ) ,
3936 Error ,
4037 'CssGridModule.create: Argument "rowCount" should be of type "number"' ,
@@ -61,7 +58,7 @@ Deno.test("CssGridModule.push - should add both a column and a row to the grid",
6158} ) ;
6259
6360Deno . test ( "CssGridModule.push - should throw an error if data is not provided" , async ( ) => {
64- await assertThrowsAsync (
61+ await assertThrows (
6562 ( ) => CssGridModule . push ( { column : "2fr" } ) ,
6663 Error ,
6764 'CssGridModule.push: Argument "data" is required' ,
@@ -89,7 +86,7 @@ Deno.test("CssGridModule.to - should convert an object to CSS grid-template valu
8986} ) ;
9087
9188Deno . test ( "CssGridModule.to - should throw an error if data is not provided" , async ( ) => {
92- await assertThrowsAsync (
89+ await assertThrows (
9390 ( ) => CssGridModule . to ( { } ) ,
9491 Error ,
9592 'CssGridModule.to: Argument "data" is required' ,
@@ -117,7 +114,7 @@ Deno.test("CssGridModule.optimize - should handle no duplicates correctly", asyn
117114} ) ;
118115
119116Deno . test ( "CssGridModule.optimize - should throw an error if values are not provided" , async ( ) => {
120- await assertThrowsAsync (
117+ await assertThrows (
121118 ( ) => CssGridModule . optimize ( { } ) ,
122119 Error ,
123120 'CssGridModule.optimize: Argument "values" is required' ,
@@ -153,7 +150,7 @@ Deno.test("CssGridModule.to_regions - should handle single row and multiple colu
153150} ) ;
154151
155152Deno . test ( "CssGridModule.to_regions - should throw an error if data is not provided" , async ( ) => {
156- await assertThrowsAsync (
153+ await assertThrows (
157154 ( ) => CssGridModule . to_regions ( { } ) ,
158155 Error ,
159156 'CssGridModule.to_regions: Argument "data" is required' ,
@@ -202,7 +199,7 @@ Deno.test("CssGridModule.copyRegion - should throw an error if start point is ou
202199 [ "A1" , "B1" , "C1" ] ,
203200 [ "A2" , "B2" , "C2" ] ,
204201 ] ;
205- await assertThrowsAsync (
202+ await assertThrows (
206203 ( ) => CssGridModule . copy_region ( {
207204 regions,
208205 start : { row : - 1 , column : 0 } ,
@@ -219,7 +216,7 @@ Deno.test("CssGridModule.copyRegion - should throw an error if end point is out
219216 [ "A1" , "B1" , "C1" ] ,
220217 [ "A2" , "B2" , "C2" ] ,
221218 ] ;
222- await assertThrowsAsync (
219+ await assertThrows (
223220 ( ) => CssGridModule . copy_region ( {
224221 regions,
225222 start : { row : 0 , column : 0 } ,
0 commit comments