File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ export default {
22 baseUrl : 'https://api.particle.io' ,
33 clientSecret : 'particle-api' ,
44 clientId : 'particle-api' ,
5- tokenDuration : 7776000 // 90 days
5+ tokenDuration : 7776000 , // 90 days
6+ defaultAuth : undefined
67} ;
Original file line number Diff line number Diff line change 1+ import { expect } from './test-setup' ;
2+ import Defaults from '../src/Defaults' ;
3+
4+ describe ( 'Default Particle constructor options' , ( ) => {
5+ it ( 'includes baseUrl' , ( ) => {
6+ expect ( Defaults ) . to . have . property ( 'baseUrl' ) ;
7+ expect ( Defaults . baseUrl ) . to . eql ( 'https://api.particle.io' ) ;
8+ } ) ;
9+
10+ it ( 'includes clientSecret' , ( ) => {
11+ expect ( Defaults ) . to . have . property ( 'clientSecret' ) ;
12+ expect ( Defaults . clientSecret ) . to . eql ( 'particle-api' ) ;
13+ } ) ;
14+
15+ it ( 'includes clientId' , ( ) => {
16+ expect ( Defaults ) . to . have . property ( 'clientId' ) ;
17+ expect ( Defaults . clientId ) . to . eql ( 'particle-api' ) ;
18+ } ) ;
19+
20+ it ( 'includes tokenDuration' , ( ) => {
21+ expect ( Defaults ) . to . have . property ( 'tokenDuration' ) ;
22+ expect ( Defaults . tokenDuration ) . to . eql ( 7776000 ) ;
23+ } ) ;
24+
25+ it ( 'includes defaultAuth' , ( ) => {
26+ expect ( Defaults ) . to . have . property ( 'defaultAuth' ) ;
27+ expect ( Defaults . defaultAuth ) . to . eql ( undefined ) ;
28+ } ) ;
29+ } ) ;
You can’t perform that action at this time.
0 commit comments