Skip to content

Commit

Permalink
remove coming soon in readme regarding new signing token
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBarba committed Sep 24, 2016
1 parent be5087a commit 3f038ea
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
node_modules
*.env
*.log
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ const APNS = require('apns2');

let client = new APNS({
team: `TFLP87PW54`,
signingKey: `ubChWXENWGhLDqbABTqvqQ7f`
signingKey: fs.readFileSync(`${__dirname}/path/to/auth.p8`)
});
```

Coming soon. [https://developer.apple.com/videos/play/wwdc2016/724/](https://developer.apple.com/videos/play/wwdc2016/724/)

#### Certificates

Create an APNS client using signed certificates:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"devDependencies": {
"gulp": "3.9.1",
"gulp-jshint": "2.0.1",
"jshint": "2.9.2",
"jshint-stylish": "2.2.0",
"jshint": "2.9.3",
"jshint-stylish": "2.2.1",
"mocha": "2.5.3",
"should": "9.0.2"
},
Expand Down
28 changes: 20 additions & 8 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const HTTP2Client = require('../lib/http2-client');

describe('http2', () => {

let client = new HTTP2Client('www.google.com', 443);
let client;

before(() => {
client = new HTTP2Client('www.google.com', 443);
});

it('should make a get request', () => {
return client.get({
Expand All @@ -35,9 +39,13 @@ describe('apns', () => {

describe('certs', () => {

let apns = new APNS({
cert: process.env.CERT_PEM || fs.readFileSync(`${__dirname}/certs/cert.pem`),
key: process.env.KEY_PEM || fs.readFileSync(`${__dirname}/certs/key.pem`)
let apns;

before(() => {
apns = new APNS({
cert: process.env.CERT_PEM || fs.readFileSync(`${__dirname}/certs/cert.pem`),
key: process.env.KEY_PEM || fs.readFileSync(`${__dirname}/certs/key.pem`)
});
});

it('should send a basic notification', () => {
Expand Down Expand Up @@ -126,9 +134,13 @@ describe('apns', () => {

describe('pkcs12', () => {

let apns = new APNS({
pfx: process.env.PFX || fs.readFileSync(`${__dirname}/certs/key.p12`),
passphrase: process.env.PASSPHRASE || ""
let apns;

before(() => {
apns = new APNS({
pfx: process.env.PFX || fs.readFileSync(`${__dirname}/certs/key.p12`),
passphrase: process.env.PASSPHRASE || ""
});
});

it('should send a basic notification', () => {
Expand Down Expand Up @@ -216,6 +228,6 @@ describe('apns', () => {
});

describe('signing token', () => {
// todo
//TODO - add tests for signing token
});
});

0 comments on commit 3f038ea

Please sign in to comment.