mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
write test for copyright headers
This commit is contained in:
parent
1412b74e7d
commit
099c799d67
1 changed files with 15 additions and 0 deletions
15
tests/copyright.spec.js
Normal file
15
tests/copyright.spec.js
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
// Copyright (C) 2017-2020 Smart code 203358507
|
||||||
|
|
||||||
|
const fs = require('fs');
|
||||||
|
const readdirp = require('readdirp');
|
||||||
|
|
||||||
|
const COPYRIGHT_HEADER = /^\/\/ Copyright \(C\) 2017-2020 Smart code 203358507.*/;
|
||||||
|
|
||||||
|
describe('copyright', () => {
|
||||||
|
test('js', async () => {
|
||||||
|
for await (const { fullPath } of readdirp('src', { fileFilter: '*.js' })) {
|
||||||
|
const content = await fs.promises.readFile(fullPath, 'utf8');
|
||||||
|
expect(content).toEqual(expect.stringMatching(COPYRIGHT_HEADER));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue