Skip to content

Commit

Permalink
Update common.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mater1996 authored Dec 9, 2024
1 parent 8dc2071 commit 1496b1b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ describe('common spec case', function () {
const output2 = compileTemplate(input2, { srcMode: 'wx', mode: 'swan' })
const output3 = compileTemplate(input3, { srcMode: 'wx', mode: 'swan' })
const wxsPath = lib('runtime/swanHelper.wxs')
expect(output1).toBe(`<import-sjs module="__swanHelper__" src="~${wxsPath}"></import-sjs><view s-for="t1, t2 in swanHelper__.processFor(list) trackBy t1.u1">123</view>`)
expect(output2).toBe(`<import-sjs module="__swanHelper__" src="~${wxsPath}"></import-sjs><view s-for='t1, t2 in swanHelper__.processFor("strings") trackBy t1.u1'>123</view>`)
expect(output3).toBe(`<import-sjs module="__swanHelper__" src="~${wxsPath}"></import-sjs><view s-for="t1, t2 in swanHelper__.processFor(8) trackBy t1.u1">123</view>`)
expect(output1).toBe(`<import-sjs module="swanHelper__" src="~${wxsPath}"></import-sjs><view s-for="t1, t2 in swanHelper__.processFor(list) trackBy t1.u1">123</view>`)
expect(output2).toBe(`<import-sjs module="swanHelper__" src="~${wxsPath}"></import-sjs><view s-for='t1, t2 in swanHelper__.processFor("strings") trackBy t1.u1'>123</view>`)
expect(output3).toBe(`<import-sjs module="swanHelper__" src="~${wxsPath}"></import-sjs><view s-for="t1, t2 in swanHelper__.processFor(8) trackBy t1.u1">123</view>`)
})

it('should wrap directive expression in swan', function () {
Expand Down

0 comments on commit 1496b1b

Please sign in to comment.