UNPKG

@builder.io/eslint-plugin-mitosis

Version:

A Mitosis plugin containing rules that help you write valid and idiomatic Mitosis code

22 lines (21 loc) 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var vitest_1 = require("vitest"); var isMitosisPath_1 = require("../isMitosisPath"); (0, vitest_1.describe)('is mitosis file helper', function () { (0, vitest_1.it)('should return true if file name contains "lite" in the extension', function () { var path = 'component.lite.tsx'; var result = (0, isMitosisPath_1.default)(path); (0, vitest_1.expect)(result).toBe(true); }); (0, vitest_1.it)('should return true if file name doesn\'t contain "lite" in the extension', function () { var path = 'component.tsx'; var result = (0, isMitosisPath_1.default)(path); (0, vitest_1.expect)(result).toBe(false); }); (0, vitest_1.it)('should return false if file name contains "lite" in the filename itself', function () { var path = 'lite.anything.tsx'; var result = (0, isMitosisPath_1.default)(path); (0, vitest_1.expect)(result).toBe(false); }); });