Skip to content

Commit 35e833a

Browse files
committed
Sorted tests.
1 parent a54fcb9 commit 35e833a

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

packages/doxdox-core/src/utils.test.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,30 @@ describe('utils', () => {
6767
});
6868
});
6969

70+
describe('getProjectPackage', () => {
71+
it('gets contents from project package', async () => {
72+
const { name, description, version, exports } = JSON.parse(
73+
await fs.readFile('./package.json', 'utf8')
74+
);
75+
76+
assert.deepEqual(await getProjectPackage('./'), {
77+
name,
78+
description,
79+
version,
80+
exports
81+
});
82+
});
83+
it('file to get contents from folder without package file', async () => {
84+
assert.deepEqual(await getProjectPackage('./src/'), {});
85+
});
86+
});
87+
88+
describe('getRootDirPath', () => {
89+
it('get dir path', () => {
90+
assert.equal(getRootDirPath(), join(process.cwd(), './src'));
91+
});
92+
});
93+
7094
describe('parseIgnoreConfig', () => {
7195
it('parse ignore config', () => {
7296
assert.deepEqual(
@@ -101,33 +125,9 @@ describe('utils', () => {
101125
});
102126
});
103127

104-
describe('getRootDirPath', () => {
105-
it('get dir path', () => {
106-
assert.equal(getRootDirPath(), join(process.cwd(), './src'));
107-
});
108-
});
109-
110128
describe('slugify', () => {
111129
it('slugify path', () => {
112130
assert.equal(slugify('./src/utils.ts'), 'src-utils-ts');
113131
});
114132
});
115-
116-
describe('getProjectPackage', () => {
117-
it('gets contents from project package', async () => {
118-
const { name, description, version, exports } = JSON.parse(
119-
await fs.readFile('./package.json', 'utf8')
120-
);
121-
122-
assert.deepEqual(await getProjectPackage('./'), {
123-
name,
124-
description,
125-
version,
126-
exports
127-
});
128-
});
129-
it('file to get contents from folder without package file', async () => {
130-
assert.deepEqual(await getProjectPackage('./src/'), {});
131-
});
132-
});
133133
});

0 commit comments

Comments
 (0)