This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
130a5ee
commit 151bc02
Showing
6 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { expect } from 'chai'; | ||
|
||
|
||
describe('Globals', function () { | ||
it('should have promise globally', function () { | ||
expect(global.Promise).to.deep.equal(require('promise')); | ||
}); | ||
|
||
it('should have promise globally', function () { | ||
expect(global.regeneratorRuntime).to.deep.equal(require('regenerator-runtime/runtime')); | ||
}); | ||
|
||
it('should be in dev', function () { | ||
expect(global.__DEV__).to.be.true; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { expect } from 'chai'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
|
||
const MAP_LOCATION = path.join(__dirname, '../haste-map.json'); | ||
|
||
describe('Haste Map', function () { | ||
it('Should have one initially', function () { | ||
const stat = fs.statSync(MAP_LOCATION); | ||
expect(stat.isFile()).to.be.true; | ||
}); | ||
|
||
it('should contain correct data', function () { | ||
const HasteMap = require('../haste-map'); | ||
expect(HasteMap).to.have.all.keys('hasteMap', 'version'); | ||
expect(HasteMap.hasteMap).to.be.an('object'); | ||
expect(HasteMap.version).to.be.a('string'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { expect } from 'chai'; | ||
import NativeModules from '../src/NativeModules'; | ||
|
||
describe('Native Modules', function () { | ||
it('Should be defined', function () { | ||
expect(require('NativeModules')).to.deep.equal(NativeModules); // eslint-disable-line import/no-unresolved | ||
expect(NativeModules).to.be.an('object'); | ||
}); | ||
|
||
describe('Single Modules', function () { | ||
Object.keys(NativeModules).forEach(function (mod) { | ||
it('should require ' + mod, function () { | ||
expect(require(mod)).to.deep.equal(NativeModules[mod]); | ||
expect(require(mod)).to.be.an('object'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { expect } from 'chai'; | ||
|
||
|
||
describe('React-Native version', function () { | ||
it('should return correct version', function () { | ||
const version = require('../src/react-native-version'); | ||
expect(version).to.be.a('string'); | ||
}); | ||
}); |