Skip to content

Commit

Permalink
refactor: moved unit tests to a unit/ folder
Browse files Browse the repository at this point in the history
to make room for integration tests for repository-settings#145
  • Loading branch information
travi committed Jan 24, 2020
1 parent e354e9b commit 624c164
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions test/index.test.js → test/unit/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { Application } = require('probot')
const plugin = require('../index')
const plugin = require('../../index')

describe('plugin', () => {
let app, event, sync, github
Expand All @@ -15,7 +15,7 @@ describe('plugin', () => {

event = {
name: 'push',
payload: JSON.parse(JSON.stringify(require('./fixtures/events/push.settings.json')))
payload: JSON.parse(JSON.stringify(require('../fixtures/events/push.settings.json')))
}
sync = jest.fn()

Expand All @@ -42,7 +42,7 @@ describe('plugin', () => {

describe('with other files modified', () => {
beforeEach(() => {
event.payload = require('./fixtures/events/push.readme.json')
event.payload = require('../fixtures/events/push.readme.json')
})

it('does not sync settings', async () => {
Expand All @@ -55,7 +55,7 @@ describe('plugin', () => {
beforeEach(() => {
event = {
name: 'repository',
payload: require('./fixtures/events/repository.edited.json')
payload: require('../fixtures/events/repository.edited.json')
}
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const branchArrayMerge = require('../../lib/mergeArrayByName')
const branchArrayMerge = require('../../../lib/mergeArrayByName')
const YAML = require('js-yaml')

describe('mergeArrayByName', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

const Branches = require('../../../lib/plugins/branches')
const Branches = require('../../../../lib/plugins/branches')

describe('Branches', () => {
let github
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Collaborators = require('../../../lib/plugins/collaborators')
const Collaborators = require('../../../../lib/plugins/collaborators')

describe('Collaborators', () => {
let github
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Labels = require('../../../lib/plugins/labels')
const Labels = require('../../../../lib/plugins/labels')

describe('Labels', () => {
let github
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Milestones = require('../../../lib/plugins/milestones')
const Milestones = require('../../../../lib/plugins/milestones')

describe('Milestones', () => {
let github
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Repository = require('../../../lib/plugins/repository')
const Repository = require('../../../../lib/plugins/repository')

describe('Repository', () => {
let github
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Teams = require('../../../lib/plugins/teams')
const Teams = require('../../../../lib/plugins/teams')

describe('Teams', () => {
let github
Expand Down

0 comments on commit 624c164

Please sign in to comment.