File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 "url" : " https://github.com/HerrCai0907/assemblyscript-prettier/issues"
3434 },
3535 "peerDependencies" : {
36- "prettier" : " ^3.3.3 "
36+ "prettier" : " ^3.0.0 "
3737 },
3838 "dependencies" : {
3939 "assemblyscript" : " ~0.27.0"
Original file line number Diff line number Diff line change 1+ import asPlugin from "../src/plugin.js" ;
2+
3+ test ( "printer should be initialized at module load time" , ( ) => {
4+ // The printer should not be empty at module load time
5+ expect ( asPlugin . printers ) . toBeDefined ( ) ;
6+ expect ( asPlugin . printers [ "as-estree" ] ) . toBeDefined ( ) ;
7+
8+ // The printer should have the print function available
9+ expect ( typeof asPlugin . printers [ "as-estree" ] . print ) . toBe ( "function" ) ;
10+
11+ // The printer should have the printComment function available
12+ expect ( typeof asPlugin . printers [ "as-estree" ] . printComment ) . toBe ( "function" ) ;
13+
14+ // The printer should have other essential methods/properties from estree
15+ expect ( typeof asPlugin . printers [ "as-estree" ] . embed ) . toBe ( "function" ) ;
16+ expect ( asPlugin . printers [ "as-estree" ] . handleComments ) . toBeDefined ( ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments