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

Commit

Permalink
test(integration): add integration-test support for new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
zachferland committed Feb 3, 2017
1 parent a0dabe3 commit d1d009f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions integration-test/clean
Expand Up @@ -2,8 +2,6 @@
# Clean/remove setup

rm -r node_modules
rm uport.js
rm karma.conf.js
rm testData.json
rm uportWeb3.js Connect.js karma.conf.js testData.json
rm ../uport-connect-0.0.0-semantic-release.tgz
rm -r coverage
4 changes: 1 addition & 3 deletions integration-test/setup
Expand Up @@ -2,9 +2,7 @@
# Script to setup tests against the npm package (not only the files)

cd ..
cp ./test/uport.js integration-test/
cp ./test/karma.conf.js integration-test/
cp ./test/testData.json integration-test/
cp ./test/uportWeb3.js ./test/Connect.js ./test/karma.conf.js ./test/testData.json integration-test/
npm pack
cd integration-test
npm install
File renamed without changes.
10 changes: 5 additions & 5 deletions test/Connect.js
@@ -1,5 +1,5 @@
import { expect, assert } from 'chai'
import Connect from '../src/Connect'
import { Connect } from './uport-connect'
// import { Credentials, SimpleSigner } from 'uport'
import { openQr, closeQr } from '../src/util/qrdisplay'
// import MockDate from 'mockdate'
Expand Down Expand Up @@ -158,7 +158,7 @@ describe('Connect', ()=> {
uport.request({
uri,
topic: mockTopic(),
uriHandler: (_uri) => {
uriHandler: (_uri) => {
assert.fail()
done()
}
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('Connect', ()=> {
}, error => {
expect(error.message).to.equal('It broke')
expect(opened).to.equal(true)
expect(closed).to.equal(true)
expect(closed).to.equal(true)
done()
})
})
Expand Down Expand Up @@ -216,7 +216,7 @@ describe('Connect', ()=> {
expect(profile).to.equal(PROFILE)
done()
}, error => {
console.err(error)
console.err(error)
done()
})
})
Expand All @@ -243,7 +243,7 @@ describe('Connect', ()=> {
expect(address).to.equal(UPORT_ID)
done()
}, error => {
console.err(error)
console.err(error)
done()
})
})
Expand Down
2 changes: 2 additions & 0 deletions test/uport-connect.js
@@ -0,0 +1,2 @@
import { Connect, QRUtil, SimpleSigner, Credentials } from '../src/index'
export { Connect, QRUtil, SimpleSigner, Credentials }
2 changes: 1 addition & 1 deletion test/uportWeb3.js
@@ -1,6 +1,6 @@
import { assert } from 'chai'
import Web3 from 'web3'
import Connect from '../src/Connect'
import { Connect } from './uport-connect'
import Autosigner from '../utils/autosigner'
import testData from './testData.json'

Expand Down

0 comments on commit d1d009f

Please sign in to comment.