* Channel list drawer * Get channels by category * Fix and connect websocket * Fix Select first team using the team members * create loadMe and fix login actions to loads the teams * Add android back button handler for the channel drawer * Channel drawer styling and functionality * Mark channel as viewed and fixed reset unread counts * Unread above/below indicators * Improve performance replacing ScrollView with ListView * Fix unread indicators * Addressing review feedback
38 lines
980 B
JavaScript
38 lines
980 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);
|
|
});
|
|
|
|
it('fetch', (done) => {
|
|
fetch('http://example.com').then(() => {
|
|
done();
|
|
}).catch(() => {
|
|
// No internet connection, but fetch still returned at least
|
|
done();
|
|
});
|
|
});
|
|
});
|