* Removed mocking from client tests * Updated Client tests to remove Client.setTeamId * Fixed actions/general.test.js * Updated test/reducer/channel.test.js for the updated store structure * Commented out general reducer tests until the store structure is more finalized * Properly used the team ID when creating a channel
28 lines
707 B
JavaScript
28 lines
707 B
JavaScript
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import 'react-native';
|
|
|
|
// 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();
|
|
});
|
|
});
|
|
});
|