Skip to content

Commit a44ef84

Browse files
committed
- add tests for the ServerCode namespace
1 parent e722d9f commit a44ef84

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/unit/specs/namespace.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,19 @@ describe('Namespace', function() {
8484

8585
expect(Backendless.ServerCode.addService()).to.be.equal(true)
8686
})
87+
88+
it('should not reset ServerCode on initApp', () => {
89+
const ServerCode = Backendless.ServerCode = {
90+
addService() {
91+
return true
92+
}
93+
}
94+
95+
Backendless.initApp(APP_ID, API_KEY)
96+
97+
expect(Backendless.ServerCode).to.be.equal(ServerCode)
98+
expect(Backendless.ServerCode.addService()).to.be.equal(true)
99+
})
87100
})
88101

89102
describe('Device', () => {

0 commit comments

Comments
 (0)