"use strict";
var R = require("ramda");
var Yadda = require("yadda");

//setup paths
var cwd = process.cwd();
var pkg = require(cwd + "/package.json");

//setup logger
var bunyanFormat = require("bunyan-format");
var logger = require("bunyan").createLogger({"name": "TEST", "stream": bunyanFormat({"outputMode": "short"})});

//get browser test config
var testConfig = R.merge({
  "url": "http://localhost",
  "port": "3000",
  "browsers": []
}, pkg.config.test);
var testUtils = require('./testUtils')(testConfig);

//Setup test 'world' context object including world.logger, assertion library, and the browser context object
//Note: world.before and world.after are reserved for adding before and after functions
var worldContext = {"world": {"logger": logger}, "cwd": cwd, "browser": {"config": testConfig}};

//initiate mocha and run test suite
Yadda.plugins.mocha.StepLevelPlugin.init();
describe('', testUtils.getTestSuite(Yadda, worldContext, pkg.directories));

@@ -6,17 +6,16 @@
 strict%22;
-%0D
 %0Avar R =
@@ -32,17 +32,16 @@
 ramda%22);
-%0D
 %0Avar Yad
@@ -62,19 +62,17 @@
 yadda%22);
-%0D%0A%0D
+%0A
 %0A//setup
@@ -77,17 +77,16 @@
 up paths
-%0D
 %0Avar cwd
@@ -102,17 +102,16 @@
 s.cwd();
-%0D
 %0Avar pkg
@@ -144,19 +144,17 @@
 .json%22);
-%0D%0A%0D
+%0A
 %0A//setup
@@ -160,17 +160,16 @@
 p logger
-%0D
 %0Avar bun
@@ -205,17 +205,16 @@
 ormat%22);
-%0D
 %0Avar log
@@ -317,19 +317,17 @@
 rt%22%7D)%7D);
-%0D%0A%0D
+%0A
 %0A//get b
@@ -344,17 +344,16 @@
 t config
-%0D
 %0Avar tes
@@ -371,17 +371,16 @@
 .merge(%7B
-%0D
 %0A  %22url%22
@@ -400,17 +400,16 @@
 alhost%22,
-%0D
 %0A  %22port
@@ -418,17 +418,16 @@
  %223000%22,
-%0D
 %0A  %22brow
@@ -439,12 +439,27 @@
 : %5B%5D
-%0D
 %0A%7D,
+ R.defaultTo(%7B%7D,
  pkg
@@ -471,18 +471,18 @@
 ig.test)
+)
 ;
-%0D
 %0Avar tes
@@ -525,19 +525,17 @@
 Config);
-%0D%0A%0D
+%0A
 %0A//Setup
@@ -636,17 +636,16 @@
 t object
-%0D
 %0A//Note:
@@ -724,17 +724,16 @@
 unctions
-%0D
 %0Avar wor
@@ -825,11 +825,9 @@
 g%7D%7D;
-%0D%0A%0D
+%0A
 %0A//i
@@ -858,17 +858,16 @@
 st suite
-%0D
 %0AYadda.p
@@ -902,17 +902,16 @@
 .init();
-%0D
 %0Adescrib
@@ -982,6 +982,5 @@
 s));
-%0D
 %0A

Update test.js to enable optional test config from package.json