|
|
@@ -0,0 +1,12 @@
|
|
|
+import test from 'node:test'
|
|
|
+import assert from 'node:assert/strict'
|
|
|
+import fs from 'node:fs'
|
|
|
+import path from 'node:path'
|
|
|
+
|
|
|
+const couponPageFile = path.resolve('pagesMy/exclusiveScroll.vue')
|
|
|
+
|
|
|
+test('专享券点击使用前必须校验活动关联', () => {
|
|
|
+ const source = fs.readFileSync(couponPageFile, 'utf8')
|
|
|
+
|
|
|
+ assert.match(source, /const handleUse\s*=\s*item\s*=>\s*\{[\s\S]*?if\s*\(!item\.activityId\)/)
|
|
|
+})
|