diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c227f91..283712f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ If you're looking to change some code in RavelinJS, read this first. - [1. Familiarise yourself with the library.](#1-familiarise-yourself-with-the-library) - [2. Use the expected NodeJS v10.](#2-use-the-expected-nodejs-v10) -- [3. Install a JSHint extension in your editor.](#3-install-a-jshint-extension-in-your-editor) +- [3. Install a JSHint extention in your editor.](#3-install-a-jshint-extention-in-your-editor) - [4. Learn how to build & test.](#4-learn-how-to-build--test) - [5. Write IE-compatible code in ./lib.](#5-write-ie-compatible-code-in-lib) - [6. Prefer testing in unit tests.](#6-prefer-testing-in-unit-tests) @@ -26,7 +26,7 @@ is meant to do what. CI runs [circleci/node:10](.circleci/config.yml). -## 3. Install a JSHint extension in your editor. +## 3. Install a JSHint extention in your editor. There are many .js files kicking around: some for use in the browser, some for use by Node JS. Some are config files, others are executable, some assume test @@ -81,7 +81,8 @@ Function.prototype.bind so use lib/util#bind. Unit tests in the test/*.test.js files have the benefit of running in a single page without needing server communication, so they're easy to run locally and -very quick to run in CI. As a result, **attempt to write all new tests as unit tests**. +very quick to run in CI. As a result, **attempt to write all new tests at unit +tests**. You can run unit tests locally using `npm run test:unit` which spawns Chrome (optionally from the `CHROME_BIN` envvar) using Karma, but we also run these @@ -110,6 +111,10 @@ of these events does not guarantee your script will work in those browsers. Adding new integration tests dramatically slows the completion time, so do **prefer unit tests where possible**. +Before running integration tests you will need authentication credentials to +connect to [BrowserStack](https://automate.browserstack.com/) which runs the +browsers we test in. Ask from @icio. + To run integration tests in test/\*/\*.spec.js: ``` diff --git a/package-lock.json b/package-lock.json index 254befc..64697ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ravelinjs", - "version": "1.0.0-rc1", + "version": "1.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 4383ef9..7e0299c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ravelinjs", - "version": "1.0.0-rc1", + "version": "1.1.2", "license": "Apache-2.0", "description": "Ravelin's Browser SDK", "author": "Ravelin (https://github.com/unravelin) ", diff --git a/test/encrypt.test.js b/test/encrypt.test.js index 5f618f1..c80bb03 100644 --- a/test/encrypt.test.js +++ b/test/encrypt.test.js @@ -1,5 +1,5 @@ var dummyRSAKey = '10001|BB2D2D2FD3812FEBECF8955843228A0E1952342583DFC02B8393475C414E16FDCBE8753BD63C164104785D8A67E344D495B5C0C622CE8D643F3191BC6BE0D3050F391F77E1D7E1B8F69DA34B308477E31F775CCC44158E33FD7DDD51AC87DD33AD80B9B1BF850CEC79A189F011C0689C36C0C91BF6DB9CD65BB7399710E32D9876C00DD44103E54A64A44BF427E1BA4F48DA7AF3D623DBCCF282ED8D4CCAE31B921A9BE92F9E8D7B5C50FBD89D828539CAE3E3493D4F6D7ADA19A876D9DF3801B5C3CFFA6A3C72A246150F307D789BAD6E2408DA5EF05EE805E11C133FFEDFA57CD1C35E49106ADDAC43C51995B9C318066C9ACB4042D8A534370D79F1BAD601'; -var expectedVersion = '1.0.0-rc1-ravelinjs'; +var expectedVersion = '1.1.2-ravelinjs'; describe('ravelin.encrypt', function() { describe('#card', function() { diff --git a/test/track.test.js b/test/track.test.js index bdf5d4c..293a967 100644 --- a/test/track.test.js +++ b/test/track.test.js @@ -22,7 +22,7 @@ describe('ravelin.track', function() { r.core.id().then(function(deviceId) { var loadEvent = JSON.parse(req.body).events[0]; expect(loadEvent).to.have.property('eventType', 'PAGE_LOADED'); - expect(loadEvent).to.have.property('libVer', '1.0.0-rc1-ravelinjs'); + expect(loadEvent).to.have.property('libVer', '1.1.2-ravelinjs'); expect(loadEvent.eventData).to.eql({eventName: 'track'}); expect(loadEvent.eventMeta.trackingSource).to.be('browser'); expect(loadEvent.eventMeta.ravelinDeviceId).to.be(deviceId); @@ -154,7 +154,7 @@ describe('ravelin.track', function() { r.core.id().then(function(deviceId) { event = event.events[0]; expect(event).to.have.property('eventType', 'paste'); - expect(event).to.have.property('libVer', '1.0.0-rc1-ravelinjs'); + expect(event).to.have.property('libVer', '1.1.2-ravelinjs'); expect(event.eventMeta.trackingSource).to.be('browser'); expect(event.eventMeta.ravelinDeviceId).to.be(deviceId); expect(event.eventData).to.eql({ @@ -189,7 +189,7 @@ describe('ravelin.track', function() { r.core.id().then(function(deviceId) { event = event.events[0]; expect(event).to.have.property('eventType', 'paste'); - expect(event).to.have.property('libVer', '1.0.0-rc1-ravelinjs'); + expect(event).to.have.property('libVer', '1.1.2-ravelinjs'); expect(event.eventMeta.trackingSource).to.be('browser'); expect(event.eventMeta.ravelinDeviceId).to.be(deviceId); expect(event.eventData).to.eql({ @@ -228,7 +228,7 @@ describe('ravelin.track', function() { r.core.id().then(function(deviceId) { event = event.events[0]; expect(event).to.have.property('eventType', 'paste'); - expect(event).to.have.property('libVer', '1.0.0-rc1-ravelinjs'); + expect(event).to.have.property('libVer', '1.1.2-ravelinjs'); expect(event.eventMeta.trackingSource).to.be('browser'); expect(event.eventMeta.ravelinDeviceId).to.be(deviceId); expect(event.eventData).to.eql({