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

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Oct 4, 2016
1 parent ddc6db5 commit 559cbe4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -46,7 +46,6 @@
"pretty-ms": "~2.1.0",
"rc": "~1.1.6",
"resolve-up": "~0.5.2",
"season": "~5.4.1",
"semver": "~5.3.0",
"spawn-sync": "~1.0.15",
"time-span": "~1.0.0",
Expand Down
13 changes: 8 additions & 5 deletions test/index.coffee
@@ -1,13 +1,16 @@
'use strict'

path = require 'path'
CSON = require 'season'
should = require 'should'
fs = require 'fs-extra'
YAML = require 'yaml-parser'
jsonFuture = require 'json-future'
Bumped = require '../lib/Bumped'
pkg = require '../package.json'

loadConfig = (filepath) ->
YAML.safeLoad(filepath)

loadJSON = (relativePath) ->
jsonFuture.load path.resolve(relativePath)

Expand Down Expand Up @@ -37,7 +40,7 @@ describe 'Bumped ::', ->
it 'initialize a configuration file', (done) ->
@bumped.init ->
config = fs.readFileSync('.bumpedrc', encoding: 'utf8')
config = CSON.parse config
config = loadConfig config
config.files.length.should.be.equal 2
done()

Expand Down Expand Up @@ -131,7 +134,7 @@ describe 'Bumped ::', ->
(err?).should.be.equal false
files.length.should.be.equal 3
config = fs.readFileSync('.bumpedrc', encoding: 'utf8')
config = CSON.parse config
config = loadConfig config
config.files.length.should.be.equal 3
done()

Expand All @@ -155,7 +158,7 @@ describe 'Bumped ::', ->
(err?).should.be.equal false
@bumped.config.rc.files.length.should.be.equal 2
config = fs.readFileSync('.bumpedrc', encoding: 'utf8')
config = CSON.parse config
config = loadConfig config
config.files.length.should.be.equal 2
done()

Expand All @@ -178,7 +181,7 @@ describe 'Bumped ::', ->

it 'exists a plugins section in the basic file scaffold', (done) ->
config = fs.readFileSync(@bumped.config.rc.config, encoding: 'utf8')
config = CSON.parse config
config = loadConfig config
(config.plugins?.prerelease?).should.be.equal true
(config.plugins?.prerelease?).should.be.equal true
done()
Expand Down

0 comments on commit 559cbe4

Please sign in to comment.