feat(v2): headerlinks (#1074)

* feat(v2): headerlinks

* fix test

* nits

* remove tictactoe:

* headerIcon

* nits

* remove lang dropdown

* fix failing test

* search box

* algolia search

* use babel-eslint to resolve dynamic import

* nits

* favicon and title

* Update .eslintignore
This commit is contained in:
Endilie Yacop Sucipto 2018-10-28 16:32:19 +08:00 committed by GitHub
parent d4458b394c
commit 85336649d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 1205 additions and 2292 deletions

View file

@ -7,10 +7,11 @@
import path from 'path';
import loadEnv from '@lib/load/env';
import loadSetup from '../loadSetup';
describe('loadEnv', () => {
test('website with both versioning & translation disabled', () => {
const siteDir = path.join(__dirname, '__fixtures__', 'simple-site');
test('website with both versioning & translation disabled', async () => {
const {siteDir} = await loadSetup('simple');
const siteConfig = {
baseUrl: '/',
organizationName: 'endiliey',
@ -24,8 +25,8 @@ describe('loadEnv', () => {
expect(env).toMatchSnapshot();
});
test('website with versioning enabled', () => {
const siteDir = path.join(__dirname, '__fixtures__', 'versioned-site');
test('website with versioning enabled', async () => {
const {siteDir} = await loadSetup('versioned');
const siteConfig = {
baseUrl: '/',
organizationName: 'endiliey',
@ -39,8 +40,8 @@ describe('loadEnv', () => {
expect(env).toMatchSnapshot();
});
test('website with translation enabled', () => {
const siteDir = path.join(__dirname, '__fixtures__', 'translated-site');
test('website with translation enabled', async () => {
const {siteDir} = await loadSetup('translated');
const siteConfig = {
baseUrl: '/',
organizationName: 'endiliey',
@ -55,8 +56,8 @@ describe('loadEnv', () => {
expect(env).toMatchSnapshot();
});
test('website with versioning & translation enabled', () => {
const siteDir = path.join(__dirname, '__fixtures__', 'transversioned-site');
test('website with versioning & translation enabled', async () => {
const {siteDir} = await loadSetup('transversioned');
const siteConfig = {
baseUrl: '/',
organizationName: 'endiliey',
@ -87,8 +88,8 @@ describe('loadEnv', () => {
);
});
test('website with languages.js but no default language set', () => {
const siteDir = path.join(__dirname, '__fixtures__', 'translated-site');
test('website with languages.js but no default language set', async () => {
const {siteDir} = await loadSetup('translated');
const siteConfig = {
baseUrl: '/',
organizationName: 'endiliey',