diff --git a/tests/src/bench.js b/tests/src/bench.js index 066c1b90..8234e911 100644 --- a/tests/src/bench.js +++ b/tests/src/bench.js @@ -21,6 +21,7 @@ export default class PhoneAuthTest extends Component { signIn = () => { const { phoneNumber } = this.state; this.setState({ message: 'Sending code ...' }); + firebase.auth() .signInWithPhoneNumber(phoneNumber) .onCodeSent(confirmResult => this.setState({ confirmResult, message: 'Code has been sent!' })) @@ -89,88 +90,3 @@ export default class PhoneAuthTest extends Component { ); } } - - -// export default class HomeScreen extends Component { -// -// constructor(props) { -// super(props); -// firebase.native.analytics(); -// this.state = { -// timeTaken: '', -// }; -// } -// -// clickMe = () => { -// this.setState({ timeTaken: 'Running...' }); -// let start = null; -// Promise.all([ -// firebase.native.database().ref('tests/types').set(DatabaseContents.DEFAULT), -// firebase.native.database().ref('tests/priority').setWithPriority({ -// foo: 'bar', -// }, 666), -// firebase.native.database().ref('tests/query').set(DatabaseContents.QUERY), -// ]).then(() => { -// start = Date.now(); -// return Promise.each(Object.keys(DatabaseContents.DEFAULT), async (dataRef) => { -// // Setup -// const ref = firebase.native.database().ref(`tests/types/${dataRef}`); -// const currentDataValue = DatabaseContents.DEFAULT[dataRef]; -// -// const callbackA = sinon.spy(); -// const callbackB = sinon.spy(); -// -// // Test -// -// await new Promise((resolve) => { -// ref.on('value', (snapshot) => { -// callbackA(snapshot.val()); -// resolve(); -// }); -// }); -// -// await new Promise((resolve) => { -// ref.on('value', (snapshot) => { -// callbackB(snapshot.val()); -// resolve(); -// }); -// }); -// -// callbackA.should.be.calledWith(currentDataValue); -// callbackA.should.be.calledOnce(); -// -// callbackB.should.be.calledWith(currentDataValue); -// callbackB.should.be.calledOnce(); -// -// const newDataValue = DatabaseContents.NEW[dataRef]; -// await ref.set(newDataValue); -// -// await new Promise((resolve) => { -// setTimeout(() => resolve(), 5); -// }); -// -// callbackA.should.be.calledWith(newDataValue); -// callbackB.should.be.calledWith(newDataValue); -// -// callbackA.should.be.calledTwice(); -// callbackB.should.be.calledTwice(); -// -// // Tear down -// -// ref.off('value'); -// return Promise.resolve(); -// }); -// }).then(() => { -// this.setState({ timeTaken: `Took ${Date.now() - start}` }); -// }).catch(console.error); -// }; -// -// render() { -// return ( -// -//