Commit 1a13c108 authored by Lidan Hifi's avatar Lidan Hifi

add mocha for testing, eslint

parent 40c01540
{
"parser": "babel-eslint",
"env": {
"node": true,
"mocha": true,
"es6": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"no-trailing-spaces": "error",
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"camelcase": [
"error",
{"properties": "always"}
],
"eqeqeq": [
"error",
"smart"
]
}
}
example/ example/
test/
# React Native Notifications # React Native Notifications
Handle push notifications for your app, including permission handling and icon badge number.
In progress In progress
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
* @providesModule RNNotifications * @providesModule RNNotifications
* @flow * @flow
*/ */
'use strict'; "use strict";
import { NativeModules, DeviceEventEmitter } from 'react-native'; import { NativeModules, DeviceEventEmitter } from "react-native";
import Map from 'core-js/library/es6/map'; import Map from "core-js/library/es6/map";
var NativeRNNotifications = NativeModules.RNNotifications; var NativeRNNotifications = NativeModules.RNNotifications; // eslint-disable-line no-unused-vars
var DEVICE_NOTIFICATION_RECEIVED_FOREGROUND_EVENT = 'notificationReceivedForeground'; var DEVICE_NOTIFICATION_RECEIVED_FOREGROUND_EVENT = "notificationReceivedForeground";
var DEVICE_NOTIFICATION_RECEIVED_BACKGROUND_EVENT = 'notificationReceivedBackground'; var DEVICE_NOTIFICATION_RECEIVED_BACKGROUND_EVENT = "notificationReceivedBackground";
var DEVICE_NOTIFICATION_OPENED_EVENT = 'notificationOpened'; var DEVICE_NOTIFICATION_OPENED_EVENT = "notificationOpened";
var _notificationHandlers = new Map(); var _notificationHandlers = new Map();
......
{ {
"name": "react-native-notifications", "name": "react-native-notifications",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/wix/react-native-notifications.git"
},
"version": "0.0.5", "version": "0.0.5",
"description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android", "description": "Advanced Push Notifications (Silent, interactive notifications) for iOS & Android",
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
"license": "MIT",
"keywords": [ "keywords": [
"react-component", "react-component",
"react-native", "react-native",
"react native",
"ios", "ios",
"push-notifications" "push-notifications",
"notifications",
"notification",
"react native notifications"
], ],
"nativePackage": true, "nativePackage": true,
"dependencies": {
"core-js": "^1.0.0"
},
"peerDependencies": { "peerDependencies": {
"react-native": ">=0.19.0" "react-native": ">=0.19.0"
}, },
"devDependencies": {
"babel-eslint": "^6.0.2",
"chai": "^3.5.0",
"chokidar-cli": "^1.2.0",
"eslint": "^2.7.0",
"mocha": "^2.4.5"
},
"scripts": {
"pretest": "./node_modules/.bin/eslint *.js test",
"test": "./node_modules/.bin/mocha --reporter spec \"test/*.spec.js\"",
"start": "npm run test --silent; ./node_modules/.bin/chokidar \"test/*.js\" \"*.js\" -c 'npm run test --silent' --silent"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "https://github.com/wix/react-native-notifications.git"
},
"homepage": "https://github.com/wix/react-native-notifications", "homepage": "https://github.com/wix/react-native-notifications",
"bugs": { "bugs": {
"url": "https://github.com/wix/react-native-notifications/issues" "url": "https://github.com/wix/react-native-notifications/issues"
}, },
"dependencies": { "main": "index.ios.js"
"core-js": "^1.0.0"
},
"author": "Lidan Hifi <lidan.hifi@gmail.com>",
"main": "index.ios.js",
"license": "MIT"
} }
var expect = require("chai").expect;
describe("NotificationsIOS", function () {
it("should pass", function () {
expect(true).to.be.true;
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment