You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by rf...@apache.org on 2016/09/20 21:03:55 UTC

[4/8] incubator-senssoft-useralejs git commit: Updated to object shorthand.

Updated to object shorthand.


Project: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/commit/87b43c7d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/tree/87b43c7d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/diff/87b43c7d

Branch: refs/heads/master
Commit: 87b43c7d142832b6d621b241e2d0ff44c179d7e4
Parents: bcb96cb
Author: Rob Foley <ro...@gmail.com>
Authored: Tue Sep 20 10:40:25 2016 -0400
Committer: Rob Foley <ro...@gmail.com>
Committed: Tue Sep 20 10:40:25 2016 -0400

----------------------------------------------------------------------
 test/main_spec.js | 36 ++++++++++--------------------------
 1 file changed, 10 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-senssoft-useralejs/blob/87b43c7d/test/main_spec.js
----------------------------------------------------------------------
diff --git a/test/main_spec.js b/test/main_spec.js
index 611a06d..6fd0741 100644
--- a/test/main_spec.js
+++ b/test/main_spec.js
@@ -3,17 +3,16 @@ import jsdom from 'jsdom';
 import fs from 'fs';
 
 describe('Userale API', () => {
-  var file = 'file://' + __dirname + '/main.html';
-  var html = fs.readFileSync(__dirname + '/main.html');
+  const url = 'file://' + __dirname + '/main.html';
+  const html = fs.readFileSync(__dirname + '/main.html');
+  const features = {
+    FetchExternalResources : ['script'],
+    ProcessExternalResources : ['script']
+  };
 
   it('provides configs', (done) => {
     jsdom.env({
-      html : html,
-      url : file,
-      features : {
-        FetchExternalResources : ['script'],
-        ProcessExternalResources : ['script']
-      },
+      html, url, features,
       done : (err, window) => {
         const config = window.userale.options();
         expect(config).to.be.an('object');
@@ -40,12 +39,7 @@ describe('Userale API', () => {
 
   it('edits configs', (done) => {
     jsdom.env({
-      html : html,
-      url : file,
-      features : {
-        FetchExternalResources : ['script'],
-        ProcessExternalResources : ['script']
-      },
+      html, url, features,
       done : (err, window) => {
         const config = window.userale.options();
         const interval = config.transmitInterval;
@@ -63,12 +57,7 @@ describe('Userale API', () => {
 
   it('starts + stops', (done) => {
     jsdom.env({
-      html : html,
-      url : file,
-      features : {
-        FetchExternalResources : ['script'],
-        ProcessExternalResources : ['script']
-      },
+      html, url, features,
       done : (err, window) => {
         setTimeout(() => {
           const { userale } = window;
@@ -89,12 +78,7 @@ describe('Userale API', () => {
 
   it('sends custom logs', (done) => {
     jsdom.env({
-      html: html,
-      url: file,
-      features : {
-        FetchExternalResources : ['script'],
-        ProcessExternalResources : ['script']
-      },
+      html, url, features,
       done: (err, window) => {
         const { userale } = window;