invoke yarn fix:js
to adopt the updated eslint rules. No other changes are included.
This commit is contained in:
@@ -80,7 +80,7 @@ describe('application', function desc() {
|
||||
|
||||
it('should show index.html when there is config file', () => {
|
||||
fs.writeFileSync(env.configFilePath, JSON.stringify({
|
||||
url: env.mattermostURL
|
||||
url: env.mattermostURL,
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
return this.app.client.waitUntilWindowLoaded().getUrl();
|
||||
@@ -92,7 +92,7 @@ describe('application', function desc() {
|
||||
it('should upgrade v0 config file', () => {
|
||||
const settings = require('../../src/common/settings');
|
||||
fs.writeFileSync(env.configFilePath, JSON.stringify({
|
||||
url: env.mattermostURL
|
||||
url: env.mattermostURL,
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
return this.app.client.waitUntilWindowLoaded().getUrl();
|
||||
|
@@ -13,11 +13,11 @@ describe('browser/index.html', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'example',
|
||||
url: env.mattermostURL
|
||||
url: env.mattermostURL,
|
||||
}, {
|
||||
name: 'github',
|
||||
url: 'https://github.com/'
|
||||
}]
|
||||
url: 'https://github.com/',
|
||||
}],
|
||||
};
|
||||
|
||||
const serverPort = 8181;
|
||||
@@ -25,7 +25,7 @@ describe('browser/index.html', function desc() {
|
||||
before(() => {
|
||||
function serverCallback(req, res) {
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'text/html'
|
||||
'Content-Type': 'text/html',
|
||||
});
|
||||
res.end(fs.readFileSync(path.resolve(env.sourceRootDir, 'test/modules/test.html'), 'utf-8'));
|
||||
}
|
||||
@@ -51,7 +51,7 @@ describe('browser/index.html', function desc() {
|
||||
|
||||
it('should NOT show tabs when there is one team', () => {
|
||||
fs.writeFileSync(env.configFilePath, JSON.stringify({
|
||||
url: env.mattermostURL
|
||||
url: env.mattermostURL,
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
return this.app.client.waitUntilWindowLoaded().
|
||||
@@ -99,8 +99,8 @@ describe('browser/index.html', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'error_1',
|
||||
url: 'http://false'
|
||||
}]
|
||||
url: 'http://false',
|
||||
}],
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
return this.app.client.waitUntilWindowLoaded().
|
||||
@@ -113,8 +113,8 @@ describe('browser/index.html', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'title_test',
|
||||
url: `http://localhost:${serverPort}`
|
||||
}]
|
||||
url: `http://localhost:${serverPort}`,
|
||||
}],
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
return this.app.client.waitUntilWindowLoaded().pause(2000);
|
||||
@@ -131,11 +131,11 @@ describe('browser/index.html', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'title_test_0',
|
||||
url: `http://localhost:${serverPort}`
|
||||
url: `http://localhost:${serverPort}`,
|
||||
}, {
|
||||
name: 'title_test_1',
|
||||
url: `http://localhost:${serverPort}`
|
||||
}]
|
||||
url: `http://localhost:${serverPort}`,
|
||||
}],
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
return this.app.client.waitUntilWindowLoaded().pause(500);
|
||||
@@ -170,11 +170,11 @@ describe('browser/index.html', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'title_test_0',
|
||||
url: `http://localhost:${serverPort}`
|
||||
url: `http://localhost:${serverPort}`,
|
||||
}, {
|
||||
name: 'title_test_1',
|
||||
url: `http://localhost:${serverPort}`
|
||||
}]
|
||||
url: `http://localhost:${serverPort}`,
|
||||
}],
|
||||
}));
|
||||
return this.app.restart().then(() => {
|
||||
// Note: Indices of webview are correct.
|
||||
|
@@ -11,11 +11,11 @@ describe('browser/settings.html', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'example',
|
||||
url: env.mattermostURL
|
||||
url: env.mattermostURL,
|
||||
}, {
|
||||
name: 'github',
|
||||
url: 'https://github.com/'
|
||||
}]
|
||||
url: 'https://github.com/',
|
||||
}],
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -473,7 +473,7 @@ describe('browser/settings.html', function desc() {
|
||||
const savedConfig = JSON.parse(fs.readFileSync(env.configFilePath, 'utf8'));
|
||||
savedConfig.teams.should.deep.contain({
|
||||
name: 'TestTeam',
|
||||
url: 'http://example.org'
|
||||
url: 'http://example.org',
|
||||
});
|
||||
done();
|
||||
}).catch((err) => {
|
||||
|
@@ -54,22 +54,22 @@ describe('PermissionManager', function() {
|
||||
manager.grant(ORIGIN + '_another', PERMISSION + '_another');
|
||||
JSON.parse(fs.readFileSync(permissionFile)).should.deep.equal({
|
||||
origin: {
|
||||
permission: 'denied'
|
||||
permission: 'denied',
|
||||
},
|
||||
origin_another: {
|
||||
permission_another: 'granted'
|
||||
}
|
||||
permission_another: 'granted',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('should restore permissions from the file', function() {
|
||||
fs.writeFileSync(permissionFile, JSON.stringify({
|
||||
origin: {
|
||||
permission: 'denied'
|
||||
permission: 'denied',
|
||||
},
|
||||
origin_another: {
|
||||
permission_another: 'granted'
|
||||
}
|
||||
permission_another: 'granted',
|
||||
},
|
||||
}));
|
||||
const manager = new PermissionManager(permissionFile);
|
||||
manager.isDenied('origin', 'permission').should.be.true;
|
||||
|
@@ -16,17 +16,17 @@ describe('application', function desc() {
|
||||
version: 1,
|
||||
teams: [{
|
||||
name: 'example_1',
|
||||
url: testURL
|
||||
url: testURL,
|
||||
}, {
|
||||
name: 'example_2',
|
||||
url: testURL
|
||||
}]
|
||||
url: testURL,
|
||||
}],
|
||||
};
|
||||
|
||||
before(() => {
|
||||
this.server = http.createServer((req, res) => {
|
||||
res.writeHead(200, {
|
||||
'Content-Type': 'text/html'
|
||||
'Content-Type': 'text/html',
|
||||
});
|
||||
res.end(fs.readFileSync(path.resolve(env.sourceRootDir, 'test/modules/test.html'), 'utf-8'));
|
||||
}).listen(serverPort, '127.0.0.1');
|
||||
@@ -114,7 +114,7 @@ describe('application', function desc() {
|
||||
};
|
||||
return Promise.all([
|
||||
tryEval(0),
|
||||
tryEvalInSettingsPage()
|
||||
tryEvalInSettingsPage(),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
@@ -6,7 +6,7 @@ const pastDefaultPreferences = require('../../src/common/config/pastDefaultPrefe
|
||||
describe('common/settings.js', () => {
|
||||
it('should upgrade v0 config file', () => {
|
||||
const v0Config = {
|
||||
url: 'https://example.com/team'
|
||||
url: 'https://example.com/team',
|
||||
};
|
||||
const config = settings.upgrade(v0Config);
|
||||
config.teams.length.should.equal(1);
|
||||
@@ -18,17 +18,17 @@ describe('common/settings.js', () => {
|
||||
const teams = [
|
||||
{
|
||||
name: 'test',
|
||||
url: 'https://example.com'
|
||||
}
|
||||
url: 'https://example.com',
|
||||
},
|
||||
];
|
||||
|
||||
const mergedTeams = settings.mergeDefaultTeams(teams);
|
||||
mergedTeams.should.deep.equal([
|
||||
{
|
||||
name: 'test',
|
||||
url: 'https://example.com'
|
||||
url: 'https://example.com',
|
||||
},
|
||||
...buildConfig.defaultTeams
|
||||
...buildConfig.defaultTeams,
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user