Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
benatespina committed Jun 19, 2018
1 parent 06c08dd commit 15e206f
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 93 deletions.
216 changes: 124 additions & 92 deletions __tests__/languageStrategy/defaultUnprefixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,40 +165,46 @@ test('Generates valid react-router-config deeply nested tree', () => {
},
component: DummyComponent,
exact: false,
routes: [{
paths: {
en: '/product/:slug/edit',
es: '/producto/:slug/editar',
eu: '/produktua/:slug/aldatu',
},
component: DummyComponent,
exact: true,
}, {
paths: {
en: '/product/:slug/view',
es: '/producto/:slug/ver',
eu: '/produktua/:slug/ikusi',
},
component: DummyComponent,
exact: true,
}, {
paths: {
en: '/product/:slug/comments/:comment',
es: '/producto/:slug/comentarios/:comment',
eu: '/produktua/:slug/iruzkinak/:comment',
routes: [
{
paths: {
en: '/product/:slug/edit',
es: '/producto/:slug/editar',
eu: '/produktua/:slug/aldatu',
},
component: DummyComponent,
exact: true,
},
component: DummyComponent,
exact: false,
routes: [{
{
paths: {
en: '/product/:slug/comments/:comment/edit',
es: '/producto/:slug/comentarios/:comment/editar',
eu: '/produktua/:slug/iruzkinak/:comment/aldatu',
en: '/product/:slug/view',
es: '/producto/:slug/ver',
eu: '/produktua/:slug/ikusi',
},
component: DummyComponent,
exact: true,
}],
}],
},
{
paths: {
en: '/product/:slug/comments/:comment',
es: '/producto/:slug/comentarios/:comment',
eu: '/produktua/:slug/iruzkinak/:comment',
},
component: DummyComponent,
exact: false,
routes: [
{
paths: {
en: '/product/:slug/comments/:comment/edit',
es: '/producto/:slug/comentarios/:comment/editar',
eu: '/produktua/:slug/iruzkinak/:comment/aldatu',
},
component: DummyComponent,
exact: true,
},
],
},
],
},
],
},
Expand All @@ -213,70 +219,88 @@ test('Generates valid react-router-config deeply nested tree', () => {
path: '/product/:slug',
component: DummyComponent,
exact: false,
routes: [{
path: '/product/:slug/edit',
component: DummyComponent,
exact: true,
}, {
path: '/product/:slug/view',
component: DummyComponent,
exact: true,
}, {
path: '/product/:slug/comments/:comment',
component: DummyComponent,
exact: false,
routes: [{
path: '/product/:slug/comments/:comment/edit',
routes: [
{
path: '/product/:slug/edit',
component: DummyComponent,
exact: true,
},
{
path: '/product/:slug/view',
component: DummyComponent,
exact: true,
}],
}],
},
{
path: '/product/:slug/comments/:comment',
component: DummyComponent,
exact: false,
routes: [
{
path: '/product/:slug/comments/:comment/edit',
component: DummyComponent,
exact: true,
},
],
},
],
},
{
path: '/es/producto/:slug',
component: DummyComponent,
exact: false,
routes: [{
path: '/es/producto/:slug/editar',
component: DummyComponent,
exact: true,
}, {
path: '/es/producto/:slug/ver',
component: DummyComponent,
exact: true,
}, {
path: '/es/producto/:slug/comentarios/:comment',
component: DummyComponent,
exact: false,
routes: [{
path: '/es/producto/:slug/comentarios/:comment/editar',
routes: [
{
path: '/es/producto/:slug/editar',
component: DummyComponent,
exact: true,
},
{
path: '/es/producto/:slug/ver',
component: DummyComponent,
exact: true,
}],
}],
},
{
path: '/es/producto/:slug/comentarios/:comment',
component: DummyComponent,
exact: false,
routes: [
{
path: '/es/producto/:slug/comentarios/:comment/editar',
component: DummyComponent,
exact: true,
},
],
},
],
},
{
path: '/eu/produktua/:slug',
component: DummyComponent,
exact: false,
routes: [{
path: '/eu/produktua/:slug/aldatu',
component: DummyComponent,
exact: true,
}, {
path: '/eu/produktua/:slug/ikusi',
component: DummyComponent,
exact: true,
}, {
path: '/eu/produktua/:slug/iruzkinak/:comment',
component: DummyComponent,
exact: false,
routes: [{
path: '/eu/produktua/:slug/iruzkinak/:comment/aldatu',
routes: [
{
path: '/eu/produktua/:slug/aldatu',
component: DummyComponent,
exact: true,
},
{
path: '/eu/produktua/:slug/ikusi',
component: DummyComponent,
exact: true,
}],
}],
},
{
path: '/eu/produktua/:slug/iruzkinak/:comment',
component: DummyComponent,
exact: false,
routes: [
{
path: '/eu/produktua/:slug/iruzkinak/:comment/aldatu',
component: DummyComponent,
exact: true,
},
],
},
],
},
],
},
Expand All @@ -291,13 +315,15 @@ test('Generates valid react-router-config complex nested tree', () => {
routes: [
{
paths: '/',
routes: [{
paths: {
en: '/en-test',
es: '/es-test',
eu: '/eu-test',
routes: [
{
paths: {
en: '/en-test',
es: '/es-test',
eu: '/eu-test',
},
},
}],
],
},
{
paths: {
Expand Down Expand Up @@ -327,21 +353,27 @@ test('Generates valid react-router-config complex nested tree', () => {
routes: [
{
path: '/',
routes: [{
path: '/en-test',
}],
routes: [
{
path: '/en-test',
},
],
},
{
path: '/es/',
routes: [{
path: '/es/es-test',
}],
routes: [
{
path: '/es/es-test',
},
],
},
{
path: '/eu/',
routes: [{
path: '/eu/eu-test',
}],
routes: [
{
path: '/eu/eu-test',
},
],
},
{path: '/cart'},
{path: '/es/carrito'},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"common-bundle": "node_modules/.bin/babel --copy-files --out-dir dist/common src",
"esm-bundle": "cp -R src dist/esm",
"cs": "npm run eslint && npm run prettier",
"prettier": "node_modules/.bin/prettier 'tests/**/*.js' 'src/**/*.js' --write --single-quote --no-bracket-spacing --trailing-comma all",
"prettier": "node_modules/.bin/prettier '__tests__/**/*.js' 'src/**/*.js' --write --single-quote --no-bracket-spacing --trailing-comma all",
"eslint": "node_modules/.bin/eslint src/**/*.js __tests__/**/*.js"
},
"files": [
Expand Down

0 comments on commit 15e206f

Please sign in to comment.