Skip to content

Commit 25d6d8a

Browse files
committed
update testing
1 parent 7009fc1 commit 25d6d8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,19 @@ describe('wxml-loader', () => {
9090
);
9191
});
9292

93-
test('should formatContent() work', async () => {
93+
test('should transformContent() work', async () => {
9494
await compile('<view wx:for="{{items}}"> {{item}} </view>', {
9595
target: function Alipay() {},
96-
formatContent: (content) => content.replace(/\bwx:/, '🦄:'),
96+
transformContent: (content) => content.replace(/\bwx:/, '🦄:'),
9797
});
9898
const result = readFile();
9999
expect(result).toBe('<view 🦄:for="{{items}}"> {{item}} </view>');
100100
});
101101

102-
test('should formatUrl() work', async () => {
102+
test('should transformUrl() work', async () => {
103103
await compile('<import src="/fixture.wxml" />', {
104104
target: function Alipay() {},
105-
formatUrl: (url) => url.replace(/fixture/, '🦄'),
105+
transformUrl: (url) => url.replace(/fixture/, '🦄'),
106106
});
107107
const result = readFile();
108108
expect(result).toBe('<import src="/🦄.wxml" />');

0 commit comments

Comments
 (0)