зеркало из https://github.com/mozilla/fxa-shared.git
feat(email): define array of popular email domains (#18) r=@vladikoff
This commit is contained in:
Родитель
208804ad6c
Коммит
bb65ca64cf
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
"gmail.com", "hotmail.com", "yahoo.com", "mail.ru", "outlook.com", "aol.com", "qq.com",
|
||||
"web.de", "yandex.ru", "gmx.de", "live.com", "comcast.net", "t-online.de", "hotmail.fr",
|
||||
"msn.com", "yahoo.fr", "orange.fr", "163.com", "icloud.com", "hotmail.co.uk"
|
||||
]
|
3
index.js
3
index.js
|
@ -1,5 +1,8 @@
|
|||
|
||||
module.exports = {
|
||||
email: {
|
||||
popularDomains: require('./email/popularDomains')
|
||||
},
|
||||
l10n: {
|
||||
localizeTimestamp: require('./l10n/localizeTimestamp'),
|
||||
supportedLanguages: require('./l10n/supportedLanguages')
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
'use strict';
|
||||
|
||||
const { assert } = require('chai');
|
||||
|
||||
describe('email/popularDomains:', () => {
|
||||
let popularDomains;
|
||||
|
||||
before(() => {
|
||||
popularDomains = require('../../email/popularDomains');
|
||||
});
|
||||
|
||||
it('returns an array of 20 domains', () => {
|
||||
assert.isArray(popularDomains);
|
||||
assert.lengthOf(popularDomains, 20);
|
||||
});
|
||||
|
||||
it('includes some well-known domains', () => {
|
||||
assert.isAtLeast(popularDomains.indexOf('gmail.com'), 0);
|
||||
assert.isAtLeast(popularDomains.indexOf('hotmail.com'), 0);
|
||||
assert.isAtLeast(popularDomains.indexOf('yahoo.com'), 0);
|
||||
});
|
||||
});
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
const { assert } = require('chai');
|
||||
|
||||
describe('localizeTimestamp:', () => {
|
||||
describe('l10n/localizeTimestamp:', () => {
|
||||
let localizeTimestamp;
|
||||
|
||||
before(() => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
const { assert } = require('chai');
|
||||
|
||||
describe('supportedLanguages:', () => {
|
||||
describe('l10n/supportedLanguages:', () => {
|
||||
let supportedLanguages;
|
||||
|
||||
before(() => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче