MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / createTempProject

Function createTempProject

packages/vite/helpers/init.spec.ts:10–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8import { runInit as runInitHelper } from './init.js';
9
10function createTempProject() {
11 const root = fs.mkdtempSync(path.join(process.cwd(), 'ns-vite-init-test-'));
12 const pkg = {
13 name: 'ns-vite-init-test-app',
14 version: '1.0.0',
15 dependencies: {
16 '@nativescript/core': '~8.0.0',
17 },
18 };
19 fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify(pkg, null, 2));
20 fs.writeFileSync(path.join(root, '.gitignore'), 'node_modules\n');
21 return root;
22}
23
24describe('init helper', () => {
25 let cwd: string;

Callers 1

init.spec.tsFile · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected