<commit_before>'use strict'

const chai = require('chai')
const should = chai.should
const expect = chai.expect
const chaiHttp = require('chai-http')
const app = require('../server/server')
const { knexConfig } = require('../config')
const knex = require('knex')(knexConfig)

chai.use(chaiHttp)

describe('staff routes', () => {

	beforeEach( done => {
    knex.migrate.rollback()
    .then(() => {
      knex.migrate.latest()
      .then(() => {
        return knex.seed.run()
        .then(() => {
          done()
        })
      })
    })
  })

  afterEach(function(done) {
    knex.migrate.rollback()
    .then(function() {
      done();
    });
  });

  it('should return all staff members', (done) => {
    chai
      .request(app)
      .get('/api/staff')
      .end((err, res) => {
        res.should.have.status(200)
        res.should.be.json // jshint ignore:line
        res.body.should.be.a('array')
        res.body.length.should.equal(3)
        res.body[0].user_id.should.equal(1)
        res.body[0].last_name.should.equal('Harms')
        res.body[0].first_name.should.equal('Walter')
        res.body[0].middle_initial.should.equal('D')
        res.body[0].role.should.equal('manager')
        res.body[0].security_level.should.equal(3)
        done()<commit_msg>altered get /api/staff test<commit_after>'use strict'

const chai = require('chai')
const should = chai.should
const expect = chai.expect
const chaiHttp = require('chai-http')
const app = require('../server/server')
const { knexConfig } = require('../config')
const knex = require('knex')(knexConfig)

chai.use(chaiHttp)

describe('staff routes', () => {

	beforeEach( done => {
    knex.migrate.rollback()
    .then(() => {
      knex.migrate.latest()
      .then(() => {
        return knex.seed.run()
        .then(() => {
          done()
        })
      })
    })
  })

  afterEach(function(done) {
    knex.migrate.rollback()
    .then(function() {
      done();
    });
  });

  it('should return all staff members', (done) => {
    chai
      .request(app)
      .get('/api/staff')
      .end((err, res) => {
        res.should.have.status(200)
        res.should.be.json // jshint ignore:line
        res.body.should.be.a('array')
        res.body.length.should.equal(3)
        res.body[0].should.have.property('user_id')
        res.body[0].should.have.property('last_name')
        res.body[0].should.have.property('first_name')
        done()
{'fraction_non_alphanumeric': 0.18442622950819673, 'fraction_numerical': 0.00778688524590164, 'mean_word_length': 2.442877291960508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2440757', 'n_tokens_mistral': 846, 'n_tokens_neox': 839, 'n_words': 127}