From 02e0ba5b97e0457fffabbc612c8a9086bb31776b Mon Sep 17 00:00:00 2001 From: AkiraFukushima
@@ -22,7 +22,7 @@ I released Whalebird version 2.4.1. In version 2.4.0, Whalebird supports streami }) describe('findTag', () => { - context('Pleroma', () => { + describe('Pleroma', () => { const doc = (new JSDOM(`
@@ -38,7 +38,7 @@ I released Whalebird version 2.4.1. In version 2.4.0, Whalebird supports streami }) }) - context('Mastodon', () => { + describe('Mastodon', () => { const doc = (new JSDOM(`
@@ -56,8 +56,8 @@ I released Whalebird version 2.4.1. In version 2.4.0, Whalebird supports streami }) describe('findAccount', () => { - context('in Pleroma', () => { - context('from Mastodon', () => { + describe('in Pleroma', () => { + describe('from Mastodon', () => { const doc = (new JSDOM(`
@h3_poteto hogehoge
@@ -72,7 +72,7 @@ describe('findAccount', () => { }) }) - context('from Pleroma', () => { + describe('from Pleroma', () => { const doc = (new JSDOM(`@h3_poteto hogehoge
diff --git a/test/mocha/validator.spec.js b/spec/unit/validator.spec.js similarity index 80% rename from test/mocha/validator.spec.js rename to spec/unit/validator.spec.js index cddd09f5..373df584 100644 --- a/test/mocha/validator.spec.js +++ b/spec/unit/validator.spec.js @@ -3,56 +3,56 @@ import { domainFormat } from '../../src/renderer/utils/validator' describe('validator', () => { describe('domainFormat', () => { - context('string contains protocol', () => { + describe('string contains protocol', () => { const domain = 'https://mastodon.social' it('should not match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, -1) }) }) - context('string contains account name', () => { + describe('string contains account name', () => { const domain = 'h3_poteto@mastodon.social' it('should not match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, -1) }) }) - context('string is gTLD domain', () => { + describe('string is gTLD domain', () => { const domain = 'mastodon.social' it('should match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, 0) }) }) - context('string is subdomain', () => { + describe('string is subdomain', () => { const domain = 'music.mastodon.social' it('should match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, 0) }) }) - context('string is subdomain', () => { + describe('string is subdomain', () => { const domain = 'social.tchncs.de' it('should match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, 0) }) }) - context('string is jp domain', () => { + describe('string is jp domain', () => { const domain = 'mstdn.co.jp' it('should match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, 0) }) }) - context('string contains hyphone', () => { + describe('string contains hyphone', () => { const domain = 'music-mastodon.social' it('should match', () => { const res = domain.search(domainFormat) assert.strictEqual(res, 0) }) }) - context('string is short domain', () => { + describe('string is short domain', () => { const domain = 'id.cc' it('should match', () => { const res = domain.search(domainFormat)