docs/tests/content/gitignore.js

12 строки
369 B
JavaScript

import fs from 'fs/promises'
import path from 'path'
const gitignorePath = path.join(process.cwd(), '.gitignore')
const gitignore = await fs.readFile(gitignorePath, 'utf8')
const entries = gitignore.split(/\r?\n/)
describe('.gitignore file', () => {
test('includes an entry for .env', () => {
expect(entries.some((entry) => entry === '.env')).toBe(true)
})
})