Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

gitignore.js 366 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
  1. const fs = require('fs')
  2. const path = require('path')
  3. const gitignorePath = path.join(process.cwd(), '.gitignore')
  4. const gitignore = fs.readFileSync(gitignorePath, 'utf8')
  5. const entries = gitignore.split(/\r?\n/)
  6. describe('.gitignore file', () => {
  7. test('includes an entry for .env', () => {
  8. expect(entries.some(entry => entry === '.env')).toBe(true)
  9. })
  10. })
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...