Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-03-06 19:05:37 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-03-06 19:05:37 +0300
commit79aba8af81327b51a1b49055323de47376dafe7a (patch)
treea7c332e752ab1a03f1a52a3cfd954f40d6686f87 /src
parent7e2325859e48f898dbc6d322f816e87434dc4824 (diff)
Apply lint:autofix on all tests
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src')
-rw-r--r--src/tests/setup.js4
-rw-r--r--src/tests/unit/ReplyBuilder.spec.js19
-rw-r--r--src/tests/unit/components/Address.spec.js6
-rw-r--r--src/tests/unit/util/HtmlHelper.spec.js15
4 files changed, 16 insertions, 28 deletions
diff --git a/src/tests/setup.js b/src/tests/setup.js
index 644a97f9f..b2ca1d5c1 100644
--- a/src/tests/setup.js
+++ b/src/tests/setup.js
@@ -29,8 +29,8 @@ global.expect = require('chai').expect
window.Date = Date
// Fix for jsdom https://github.com/developit/preact/issues/444
-global.SVGElement = global.Element;
+global.SVGElement = global.Element
global.OC = {
- getLocale: () => 'en'
+ getLocale: () => 'en',
}
diff --git a/src/tests/unit/ReplyBuilder.spec.js b/src/tests/unit/ReplyBuilder.spec.js
index 3aa660195..961c8e099 100644
--- a/src/tests/unit/ReplyBuilder.spec.js
+++ b/src/tests/unit/ReplyBuilder.spec.js
@@ -43,14 +43,9 @@
*
*/
-import {
- buildReplyBody,
- buildRecipients,
- buildReplySubject,
-} from '../../ReplyBuilder'
+import {buildReplyBody, buildRecipients, buildReplySubject} from '../../ReplyBuilder'
describe('ReplyBuilder', () => {
-
it('creates a reply body without any sender', () => {
const body = 'Newsletter\nhello\ncheers'
const expectedReply = '\n\n\n> Newsletter\n> hello\n> cheers'
@@ -70,7 +65,7 @@ describe('ReplyBuilder', () => {
label: 'Test User',
email: 'test@user.ru',
},
- 1541426237,
+ 1541426237
)
expect(replyBody.startsWith(expectedReply)).to.be.true
@@ -78,14 +73,14 @@ describe('ReplyBuilder', () => {
let envelope
- beforeEach(function () {
+ beforeEach(function() {
envelope = {}
})
const createAddress = addr => {
return {
label: addr,
- email: addr
+ email: addr,
}
}
@@ -193,7 +188,7 @@ describe('ReplyBuilder', () => {
assertSameAddressList(reply.cc, [dani])
})
- it('handles jan\'s reply to nina\'s mesage to a mailing list', () => {
+ it("handles jan's reply to nina's mesage to a mailing list", () => {
const nina = createAddress('nina@nc.com')
const list = createAddress('list@nc.com')
const jan = createAddress('jan@nc.com')
@@ -217,13 +212,11 @@ describe('ReplyBuilder', () => {
expect(replySubject).to.equal('RE: Hello')
})
- it('does not stack subject re:\'s', () => {
+ it("does not stack subject re:'s", () => {
const orig = 'Re: Hello'
const replySubject = buildReplySubject(orig)
expect(replySubject).to.equal('Re: Hello')
})
-
})
-
diff --git a/src/tests/unit/components/Address.spec.js b/src/tests/unit/components/Address.spec.js
index 5d70fee75..cb37e5090 100644
--- a/src/tests/unit/components/Address.spec.js
+++ b/src/tests/unit/components/Address.spec.js
@@ -24,7 +24,7 @@ describe('Address', () => {
const addr = shallowMount(Address, {
localVue,
mocks: {
- $route
+ $route,
},
propsData: {
label: 'Test User',
@@ -36,5 +36,5 @@ describe('Address', () => {
expect(addr.vm.newMessageRoute.params.accountId).to.equal(1)
expect(addr.vm.newMessageRoute.params.folderId).to.equal('folder1')
expect(addr.vm.newMessageRoute.query.to).to.equal('user@domain.com')
- });
-});
+ })
+})
diff --git a/src/tests/unit/util/HtmlHelper.spec.js b/src/tests/unit/util/HtmlHelper.spec.js
index b2498e09c..771090072 100644
--- a/src/tests/unit/util/HtmlHelper.spec.js
+++ b/src/tests/unit/util/HtmlHelper.spec.js
@@ -44,13 +44,7 @@ describe('HtmlHelper', () => {
})
it('does not produce large number of line breaks for nested elements', () => {
- const html =
- '<div>' +
- ' <div>' +
- ' line1' +
- ' </div>' +
- '</div>' +
- '<div>line2</div>'
+ const html = '<div>' + ' <div>' + ' line1' + ' </div>' + '</div>' + '<div>line2</div>'
const expected = ' line1 line2'
const actual = htmlToText(html)
@@ -86,9 +80,10 @@ describe('HtmlHelper', () => {
})
it('converts deeply nested elements to text', () => {
- const html = '<html>'
- + '<body><p>Hello!</p><p>this <i>is</i> <b>some</b> random <strong>text</strong></p></body>'
- + '</html>'
+ const html =
+ '<html>' +
+ '<body><p>Hello!</p><p>this <i>is</i> <b>some</b> random <strong>text</strong></p></body>' +
+ '</html>'
const expected = 'Hello!\n\nthis is some random text'
const actual = htmlToText(html)