This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

vit / test / version.test.js
811 B 26 lines
1// SPDX-License-Identifier: MIT 2// Copyright (c) 2026 sol pbc 3 4import { describe, expect, test } from 'bun:test'; 5import { execSync } from 'node:child_process'; 6import { readFileSync } from 'node:fs'; 7import { join } from 'node:path'; 8 9const repoRoot = join(import.meta.dir, '..'); 10 11describe('vit --version', () => { 12 test('matches package.json under node and bun', () => { 13 const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8')); 14 const nodeOutput = execSync('node bin/vit.js --version', { 15 cwd: repoRoot, 16 encoding: 'utf-8', 17 }).trim(); 18 const bunOutput = execSync('bun bin/vit.js --version', { 19 cwd: repoRoot, 20 encoding: 'utf-8', 21 }).trim(); 22 23 expect(nodeOutput).toBe(pkg.version); 24 expect(bunOutput).toBe(pkg.version); 25 }); 26});