react-native-navigation的迁移库

UniqueIdProvider.test.js 451B

12345678910111213141516171819
  1. describe('UniqueIdProvider', () => {
  2. let uut;
  3. beforeEach(() => {
  4. uut = require('./UniqueIdProvider');
  5. });
  6. it('provides uniqueId', () => {
  7. expect(uut.uniqueId()).toEqual('1');
  8. expect(uut.uniqueId()).toEqual('2');
  9. });
  10. it('provides with prefix', () => {
  11. expect(uut.uniqueId('prefix')).toEqual('prefix1');
  12. expect(uut.uniqueId('prefix')).toEqual('prefix2');
  13. expect(uut.uniqueId('other')).toEqual('other3');
  14. });
  15. });