mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 08:55:33 +02:00
✅ Fix license test
This commit is contained in:
parent
d84204ef17
commit
ffef881079
2 changed files with 13 additions and 2 deletions
|
@ -1,11 +1,22 @@
|
|||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import { join } from 'path'
|
||||
import { isValidLicense } from './license-check'
|
||||
|
||||
describe('isValidLicense', () => {
|
||||
it('Returns true if the file contains a valid license', async () => {
|
||||
expect(await isValidLicense('./license-check.test.ts')).toBe(true)
|
||||
expect(await isValidLicense(join(__dirname, 'license-check.test.ts'))).toBe(
|
||||
true
|
||||
)
|
||||
})
|
||||
|
||||
it('Returns false if the file contains an invalid license header', async () => {
|
||||
expect(await isValidLicense('./tests/invalid-license.txt')).toBe(false)
|
||||
expect(
|
||||
await isValidLicense(
|
||||
join(__dirname, '../../tests/assets/invalid-license.txt')
|
||||
)
|
||||
).toBe(false)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue