const assert = require('assert')
const fs = require('fs')
const path = require('path')

const GitHub = require('../../src/models/github')

describe('GitHub', () => {
  describe('getToken', () => {
    it('returns contents of .env file', () => {
      const tokenPath = path.join(__dirname, '..', '..', '.env')
      const expected = fs.readFileSync(tokenPath).toString()
      assert(expected === GitHub.getToken())
    })
  })
})

const assert = require('assert')
const fs = require('fs')
const path = require('path')

const GitHub = require('../../src/models/github')

describe('GitHub', () => {
  describe('getToken', () => {
    it('returns contents of .env file', () => {
      const tokenPath = path.join(__dirname, '..', '..', '.env')
      const expected = fs.readFileSync(tokenPath).toString().trim()
      assert(expected === GitHub.getToken())
    })
  })
})

Update test to expect no newline in token
Update test to expect no newline in token
