Skip to content

Commit

Permalink
re-organize broccoli tests for better isolation
Browse files Browse the repository at this point in the history
  • Loading branch information
Elindorath committed Oct 4, 2021
1 parent 02cafa8 commit 8f71fa1
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
test/broccoli/javascript.js
test/broccoli/src/javascript.js
test/templating/javascript.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"coverage": "nyc --reporter=lcov --reporter=text npm run test",
"test": "mocha -r @babel/register -r @babel/polyfill --recursive test/*.test.js test/**/*.test.js",
"test:gulp": "yarn -s build && gulp --cwd test/ i18next",
"test:broccoli": "yarn -s build && broccoli build --brocfile-path test/Brocfile.js",
"test:broccoli": "yarn -s build && broccoli build --brocfile-path test/broccoli/Brocfile.js",
"watch": "babel src -d dist -w",
"prettify": "prettier --write \"{src,test}/**/*.js\"",
"build": "babel src -d dist",
Expand Down
7 changes: 4 additions & 3 deletions test/Brocfile.js → test/broccoli/Brocfile.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
const Funnel = require('broccoli-funnel')
const i18nextParser = require('../dist/index').broccoli
const i18nextParser = require('../../dist/index').broccoli

const appRoot = 'broccoli'
const appRoot = 'src'

let i18n = new Funnel(appRoot, {
files: ['handlebars.hbs', 'javascript.js'],
annotation: 'i18next-parser',
})

i18n = new i18nextParser([i18n], {
output: 'broccoli/locales/$LOCALE/$NAMESPACE.json',
output: 'src/locales/$LOCALE/$NAMESPACE.json',
sort: true,
})

module.exports = i18n
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"fifth_male": "",
"first": "",
"fourth": "",
"fourth_male": "defaultValue",
"second": "defaultValue",
"second_male": "defaultValue",
"third": "defaultValue",
"third_female": "defaultValue",
"fourth": "defaultValue",
"fourth_male": "defaultValue",
"fifth": "",
"fifth_male": "",
"seventh": "defaultValue",
"sixth": "",
"seventh": "defaultValue"
"third": "{{var}} defaultValue",
"third_female": "defaultValue"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"fifth_male": "",
"first": "",
"fourth": "",
"fourth_male": "defaultValue",
"second": "defaultValue",
"second_male": "defaultValue",
"third": "defaultValue",
"third_female": "defaultValue",
"fourth": "defaultValue",
"fourth_male": "defaultValue",
"fifth": "",
"fifth_male": "",
"seventh": "defaultValue",
"sixth": "",
"seventh": "defaultValue"
"third": "{{var}} defaultValue",
"third_female": "defaultValue"
}

0 comments on commit 8f71fa1

Please sign in to comment.