mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-10 20:44:13 +08:00
17 lines
368 B
TypeScript
17 lines
368 B
TypeScript
import {
|
|
filter
|
|
} from '../../src/utils/tpl';
|
|
|
|
import '../../src/utils/tpl-builtin';
|
|
import '../../src/utils/tpl-lodash';
|
|
test('filter', () => {
|
|
expect(filter('xxx_a=${a}&b=${b}', {
|
|
a: 1,
|
|
b: 2
|
|
})).toEqual('xxx_a=1&b=2');
|
|
|
|
expect(filter('xxx_a=<%= data.a%>&b=<%= data.b%>', {
|
|
a: 1,
|
|
b: 2
|
|
})).toEqual('xxx_a=1&b=2');
|
|
}) |