Files
mattermost-mobile/test/sanity.test.js
enahum 618b4bfc6f PLT-6156 Update npm dependencies (#451)
* PLT-6156 Update npm dependencies

* re-add remote-redux devtools to build in jenkins
2017-04-03 16:34:03 -03:00

30 lines
744 B
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import 'react-native';
global.WebSocket = require('ws');
// Set up a global hooks to make debugging tests less of a pain
before(() => {
process.on('unhandledRejection', (reason) => {
// Rethrow so that tests will actually fail and not just timeout
throw reason;
});
});
// Ensure that everything is imported correctly for testing
describe('Sanity test', () => {
it('Promise', (done) => {
Promise.resolve(true).then(() => {
done();
}).catch((err) => {
done(err);
});
});
it('async/await', async () => {
await Promise.resolve(true);
});
});