Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): fix issue with default instanceIdentifier [triage-skip] #26

Merged
merged 1 commit into from
May 31, 2017

Conversation

jshcrowthe
Copy link
Contributor

@jshcrowthe jshcrowthe commented May 31, 2017

FirebaseApp's contract with the components is that the instanceIdentifier will be undefined in the
default case (not the string [DEFAULT]). This was not tested by any existing tests and was broken in the async refactor. This fixes that issue and adds a test.

FirebaseApp's contract with the components is that the instanceIdentifier will be undefined if
default (not the string '[DEFAULT]'). This was not tested by any existing tests and was broken in
the async refactor. This fixes that issue and adds a test.
@sphippen
Copy link
Contributor

Looks good to me.

@jshcrowthe jshcrowthe merged commit 01e9535 into master May 31, 2017
@jshcrowthe jshcrowthe deleted the fix-instance-identifier branch May 31, 2017 19:05
@ataliadvanstep
Copy link

I writing some unit for React with the Jest unit test framework but I got the following error while
TypeError: _firebase2.default.storage is not a function

Here the stacktrace :

` FAIL src/components/organisms/PriceSettingsBlock/PriceSettingsBlock.test.js
● Test suite failed to run

TypeError: _firebase2.default.storage is not a function

  at Object.<anonymous> (src/core/firebase/firebase.js:8:120)
  at Object.<anonymous> (src/core/firebase/firebase-list.js:1:815)
  at Object.<anonymous> (src/core/chat/eventList.js:30:77)
  at Object.<anonymous> (src/core/chat/sagas.js:4:44)
  at Object.<anonymous> (src/core/chat/index.js:2:62)
  at Object.<anonymous> (src/core/init/sagas.js:3:39)
  at Object.<anonymous> (src/core/init/index.js:1:387)
  at Object.<anonymous> (src/components/organisms/PriceSettingsBlock/PriceSettingsBlock.js:6:39)
  at Object.<anonymous> (src/components/organisms/PriceSettingsBlock/PriceSettingsBlock.test.js:4:53)
  at handle (node_modules/worker-farm/lib/child/index.js:41:8)
  at process.<anonymous> (node_modules/worker-farm/lib/child/index.js:47:3)
  at emitTwo (events.js:106:13)
  at process.emit (events.js:194:7)
  at process.nextTick (internal/child_process.js:766:12)
  at _combinedTickCallback (internal/process/next_tick.js:73:7)
  at process._tickCallback (internal/process/next_tick.js:104:9)`

Test file is here :
PriceSettingsBlock.js.txt
PriceSettingsBlock.test.js.txt

My configuration is here:
`import firebase from 'firebase';
import { firebaseConfig } from './config';

export const firebaseApp = firebase.initializeApp(firebaseConfig);
export const firebaseAuth = firebaseApp.auth();
export const firebaseDb = firebaseApp.database();
// firebase.storage() seems to be null
export const firebaseStorage = firebase.storage();`

And my configuration ( config.js):

export const firebaseConfig = {
apiKey: 'my api key',
authDomain: 'my-project-id.firebaseapp.com',
databaseURL: 'https://my-project-id.firebaseio.com',
projectId: 'my-project-id',
storageBucket: 'my-project-id.appspot.com',
messagingSenderId: 'my-sender-id'
};

Any idea ?

@jshcrowthe
Copy link
Contributor Author

@ataliadvanstep if you could create an issue demonstrating the behavior you are seeing, we can track that separately.

@ataliadvanstep
Copy link

ataliadvanstep commented Jun 19, 2017

@jshcrowthe I have create a new project with create-react-app:
https://github.com/ataliadvanstep/firebase-jest
Just clone the project and run npm test
image

@ataliadvanstep
Copy link

@jshcrowthe have you been able to reproduce the error ?

@jshcrowthe
Copy link
Contributor Author

@ataliadvanstep I created #73 to track this. Let's continue the conversation there 😄

@ataliadvanstep
Copy link

ataliadvanstep commented Jun 21, 2017 via email

@firebase firebase locked and limited conversation to collaborators Oct 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants