From 06051c4bf207ff9ac09292b8a5a73b254608cf0e Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 23 Aug 2021 16:00:46 -0400 Subject: [PATCH] feat(experimental): support ref transform for sfc normal ``) + expect(content).not.toMatch(`$ref(0)`) + expect(content).toMatch(`import { ref as _ref } from 'vue'`) + expect(content).toMatch(`let count = _ref(0)`) + expect(content).toMatch(`count.value++`) + expect(content).toMatch(`return ({ count })`) + assertCode(content) + }) + + test('usage with normal + `) + // should dedupe helper imports + expect(content).toMatch(`import { ref as _ref } from 'vue'`) + + expect(content).toMatch(`let a = _ref(0)`) + expect(content).toMatch(`let b = _ref(0)`) + + // root level ref binding declared in