提交 300132c8 编写于 作者: fxy060608's avatar fxy060608

chore: tests

上级 5c96d588
import { rewriteConsoleExpr } from '../src/logs/console'
import { normalizeLog } from '../src/hbx/formatLog'
const filename = 'foo.vue'
describe('console', () => {
test('console.log', () => {
......@@ -41,11 +40,4 @@ console.log(a,b,c);
rewriteConsoleExpr(filename, `console.info(a,b,c);`)
).toMatchSnapshot()
})
test('console.log format', () => {
expect(
normalizeLog('log', 'at ' + filename + ':1', ['a', 'b', { a: 1 }])
).toBe(
`a---COMMA---b---COMMA------BEGIN:JSON---{"a":1}---END:JSON--- at foo.vue:1`
)
})
})
import { normalizeLog } from '../../src/hbx/formatLog'
const filename = 'foo.vue'
describe('console', () => {
test('console.log format', () => {
expect(
normalizeLog('log', 'at ' + filename + ':1', ['a', 'b', { a: 1 }])
).toBe(
`a---COMMA---b---COMMA------BEGIN:JSON---{"a":1}---END:JSON--- at foo.vue:1`
)
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册