mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-15 16:14:52 +00:00
Adds json file extension test case
This commit is contained in:
1 parent
dda977068a
commit
e142b024b5
4 files changed
+13
-17
No files matched your search
@@ -1,7 +1,14 @@
|
||||
const R = require('ramda');
|
||||
const fs = require('fs');
|
||||
const { getDomains, validateDomainData } = require('../utils/domain');
|
||||
const { DOMAINS_PATH } = require('../utils/constants');
|
||||
|
||||
describe('Domains', () => {
|
||||
it('should all be json', async () => {
|
||||
const files = await fs.promises.readdir(DOMAINS_PATH, {});
|
||||
expect(files.filter(f => !/\.json$/g.test(f)).length).toBe(0);
|
||||
});
|
||||
|
||||
it('should be valid', (done) => {
|
||||
getDomains()
|
||||
.then(R.map(data => {
|
||||
|
||||
Reference in new issue
Block a user