Skip to content

Commit

Permalink
chore: rename test-workspace folders
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Oct 23, 2023
1 parent ce5623e commit 9ca5dcd
Show file tree
Hide file tree
Showing 193 changed files with 19 additions and 19 deletions.
32 changes: 16 additions & 16 deletions packages/component-meta/tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createComponentMetaChecker, createComponentMetaCheckerByJsonConfig, Met
const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describe(`vue-component-meta ${withTsconfig ? 'with tsconfig' : 'without tsconfig'}`, () => {

test('empty-component', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/empty-component/component.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/empty-component/component.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.props.map(prop => prop.name)).toEqual([
Expand All @@ -20,7 +20,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('reference-type-props', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/reference-type-props/component.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/reference-type-props/component.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -341,7 +341,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('reference-type-props-js', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/reference-type-props/component-js.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/reference-type-props/component-js.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -385,7 +385,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('reference-type-props-js-setup', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/reference-type-props/component-js-setup.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/reference-type-props/component-js-setup.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -459,7 +459,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('reference-type-events', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/reference-type-events/component.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/reference-type-events/component.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -536,7 +536,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('template-slots', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/template-slots/component.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/template-slots/component.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -564,7 +564,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('template-slots without a script block', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/template-slots/component-no-script.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/template-slots/component-no-script.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -592,7 +592,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('class-slots', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/class-slots/component.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/class-slots/component.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand All @@ -611,7 +611,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('exposed', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/reference-type-exposed/component.vue');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/reference-type-exposed/component.vue');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand All @@ -626,7 +626,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('ts-component', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/ts-component/component.ts');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/ts-component/component.ts');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Function);
Expand All @@ -647,7 +647,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('ts-named-exports', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/ts-named-export/component.ts');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/ts-named-export/component.ts');
const exportNames = checker.getExportNames(componentPath);
const Foo = checker.getComponentMeta(componentPath, 'Foo');
const Bar = checker.getComponentMeta(componentPath, 'Bar');
Expand All @@ -673,7 +673,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ

test('options-api', () => {

const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/options-api/component.ts');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/options-api/component.ts');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Class);
Expand Down Expand Up @@ -727,14 +727,14 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
});

test('non-component', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/non-component/component.ts');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/non-component/component.ts');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Unknown);
});

test('ts-component.tsx', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/vue-component-meta/ts-component/component.tsx');
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/ts-component/component.tsx');
const meta = checker.getComponentMeta(componentPath);

expect(meta.type).toEqual(TypeMeta.Function);
Expand Down Expand Up @@ -762,11 +762,11 @@ const checkerOptions: MetaCheckerOptions = {
printer: { newLine: 1 },
};
const tsconfigChecker = createComponentMetaChecker(
path.resolve(__dirname, '../../../test-workspace/vue-component-meta/tsconfig.json'),
path.resolve(__dirname, '../../../test-workspace/component-meta/tsconfig.json'),
checkerOptions,
);
const noTsConfigChecker = createComponentMetaCheckerByJsonConfig(
path.resolve(__dirname, '../../../test-workspace/vue-component-meta'),
path.resolve(__dirname, '../../../test-workspace/component-meta'),
{
"extends": "../tsconfig.json",
"include": [
Expand Down
2 changes: 1 addition & 1 deletion packages/tsc/tests/dts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as ts from 'typescript';
import { describe, expect, it } from 'vitest';
import { createProgram } from '../out';

const workspace = path.resolve(__dirname, '../../../test-workspace/vue-tsc-dts');
const workspace = path.resolve(__dirname, '../../../test-workspace/tsc-dts');
const testFiles = readFilesRecursive(workspace);
const ensureTs = (filename: string) => filename.endsWith('.ts') ? filename : filename + '.ts';
const normalizePath = (filename: string) => filename.replace(/\\/g, '/');
Expand Down
4 changes: 2 additions & 2 deletions packages/tsc/tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { describe, it } from 'vitest';
import { fork } from 'child_process';

const binPath = require.resolve('../bin/vue-tsc.js');
const workspace = path.resolve(__dirname, '../../../test-workspace/vue-tsc');
const workspace = path.resolve(__dirname, '../../../test-workspace/tsc');

function prettyPath(path: string, isRoot: boolean) {
const segments = path.split('/');
const slicePath = (seg: number) => segments
.slice(segments.length - seg, segments.length)
.join('/')
.replace('/vue-tsc', '');
.replace('test-workspace/tsc/', '');
return !isRoot ? slicePath(4) : slicePath(3);
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9ca5dcd

Please sign in to comment.