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

Commit

Permalink
feat(unit-tests): Adding unit-tests for iOS
Browse files Browse the repository at this point in the history
see #2
  • Loading branch information
hypery2k committed Mar 15, 2017
1 parent 8eb3dc8 commit 8c5be43
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ src/lib
src/platforms
src/hooks
src/node_modules
target/
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ node_modules
*.log
*.ts
!*.d.ts
spec/
target/
16 changes: 11 additions & 5 deletions spec/mocks/general.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ import mockery from "mockery";
mockery.enable();
mockery.warnOnUnregistered(false);
mockery.registerMock("application", {
android:{
on:function (){
android: {
on: function () {

}
},
AndroidApplication:{
activityResumedEvent:{}
ios: {
delegate: {}
},
AndroidApplication: {
activityResumedEvent: {}
}
});
mockery.registerMock("platform", {});
mockery.registerMock("utils/utils", {});

global.UIResponder={};
global.UIApplicationDelegate={}
15 changes: 15 additions & 0 deletions spec/urlhandler.ios.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import './mocks/general.mock';
import {
handleOpenURL,
UrlHandlerAppDelegate
} from '../urlhandler.ios';


describe('iOS', function () {
it('handleOpenURL', function () {
expect(handleOpenURL).toBeDefined();
});
it('UrlHandlerAppDelegate', function () {
expect(UrlHandlerAppDelegate).toBeDefined();
});
});
6 changes: 0 additions & 6 deletions target/junit-report/junitresults-Android.xml

This file was deleted.

0 comments on commit 8c5be43

Please sign in to comment.