File tree Expand file tree Collapse file tree
packages/scaffold/test/unit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,14 +10,9 @@ vi.mock("../../src/utils/logger.js");
1010
1111describe ( "fluent-manager" , ( ) => {
1212 let manager : FluentManager ;
13- const input = `
14- welcome = Welcome
15- about = About { welcome }
16- ` ;
1713
1814 beforeEach ( ( ) => {
1915 manager = new FluentManager ( ) ;
20- manager . parse ( input ) ;
2116 } ) ;
2217
2318 afterEach ( ( ) => {
@@ -26,17 +21,27 @@ about = About { welcome }
2621
2722 describe ( "getMessages()" , ( ) => {
2823 it ( "should return all message IDs" , ( ) => {
24+ manager . parse ( `
25+ welcome = Welcome
26+ about = About { welcome }
27+ ` ) ;
2928 const messages = manager . getMessages ( ) ;
3029 expect ( messages ) . toEqual ( [ "welcome" , "about" ] ) ;
3130 } ) ;
3231 } ) ;
3332
3433 describe ( "prefix()" , ( ) => {
3534 it ( "should prefix message IDs correctly" , ( ) => {
35+ manager . parse ( `
36+ welcome = Welcome
37+ about = About { welcome }
38+ test-prefixed = Test { welcome }
39+ ` ) ;
3640 manager . prefixMessages ( "test" ) ;
3741 expect ( manager . serialize ( ) ) . toBe ( [
3842 "test-welcome = Welcome" ,
3943 "test-about = About { test-welcome }" ,
44+ "test-prefixed = Test { test-welcome }" ,
4045 "" ,
4146 ]
4247 . join ( "\n" ) ) ;
You can’t perform that action at this time.
0 commit comments