11// utils
2- import * as shared from '@intlify/shared'
32vi . mock ( '@intlify/shared' , async ( ) => {
43 const actual = await vi . importActual < object > ( '@intlify/shared' )
54 return {
@@ -9,7 +8,7 @@ vi.mock('@intlify/shared', async () => {
98} )
109
1110import { baseCompile } from '@intlify/message-compiler'
12- import { compile , isMessageAST , clearCompileCache } from '../src/compilation'
11+ import { clearCompileCache , compile , isMessageAST } from '../src/compilation'
1312import { createMessageContext as context } from '../src/runtime'
1413
1514const DEFAULT_CONTEXT = { locale : 'en' , key : 'key' }
@@ -25,7 +24,7 @@ describe('isMessageAST', () => {
2524 } )
2625 } )
2726
28- describe ( 'minify AST' , ( ) => {
27+ describe ( 'mangle AST' , ( ) => {
2928 test ( 'should be true' , ( ) => {
3029 expect ( isMessageAST ( { type : 0 , b : '' } ) ) . toBe ( true )
3130 } )
@@ -60,11 +59,11 @@ describe('compile', () => {
6059 expect ( msg ( ctx ) ) . toBe ( 'hello kazupon!' )
6160 } )
6261
63- test ( 'minify ' , ( ) => {
62+ test ( 'mangle ' , ( ) => {
6463 const { ast } = baseCompile ( 'hello {name}!' , {
6564 location : false ,
6665 jit : true ,
67- minify : true
66+ mangle : true
6867 } )
6968 const msg = compile ( ast , DEFAULT_CONTEXT )
7069 const ctx = context ( {
@@ -78,7 +77,7 @@ describe('compile', () => {
7877 const { ast } = baseCompile ( 'hello {0}!' , {
7978 location : false ,
8079 jit : true ,
81- minify : true
80+ mangle : true
8281 } )
8382 const msg = compile ( ast , DEFAULT_CONTEXT )
8483 const ctx = context ( {
0 commit comments