Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Rename semaphore v2 clearly in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiendem committed Sep 10, 2019
1 parent 5a5c489 commit 0c57093
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/services/semaphore2x.test.js
@@ -1,4 +1,4 @@
var semaphore = require('../../lib/services/semaphore2x')
var semaphore2 = require('../../lib/services/semaphore2x')

describe('Semaphore 2.x CI Provider', function() {
var OLD_ENV = process.env
Expand All @@ -14,20 +14,20 @@ describe('Semaphore 2.x CI Provider', function() {
it('can detect semaphore 2x', function() {
process.env.SEMAPHORE = 'true'
process.env.SEMAPHORE_WORKFLOW_ID = '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf'
expect(semaphore.detect()).toBe(true)
expect(semaphore2.detect()).toBe(true)
})

it('does not detect semaphore 1.x', function() {
process.env.SEMAPHORE = 'true'
process.env.SEMAPHORE_REPO_SLUG = 'owner/repo'
expect(semaphore.detect()).toBe(false)
expect(semaphore2.detect()).toBe(false)
})

it('can get semaphore env info', function() {
process.env.SEMAPHORE_GIT_BRANCH = 'development'
process.env.SEMAPHORE_GIT_SHA = '5c84719708b9b649b9ef3b56af214f38cee6acde'
process.env.SEMAPHORE_WORKFLOW_ID = '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf'
expect(semaphore.configuration()).toEqual({
expect(semaphore2.configuration()).toEqual({
service: 'semaphore2x',
branch: 'development',
build: '65c9bb1c-aeb6-41f0-b8d9-6fa177241cdf',
Expand Down

0 comments on commit 0c57093

Please sign in to comment.