@@ -87,6 +96,10 @@ describe('component test', function() {
expect(this.withDollarSignParamsNode.textContent).toEqual('We should have two dollar signs $$!')
})
+ it('text with number params', function() {
+ expect(this.withNumberParamsNode.textContent).toEqual('13 things!')
+ })
+
it('changing language in text with params', function() {
this.store.dispatch(setLanguage('es'))
expect(this.withParamsNode.textContent).toEqual('Hola Francesc!')
diff --git a/test/components/TransWithNumberParams.js b/test/components/TransWithNumberParams.js
new file mode 100644
index 0000000..1ed9b90
--- /dev/null
+++ b/test/components/TransWithNumberParams.js
@@ -0,0 +1,15 @@
+import React from "react"
+
+class TransWithNumberParams extends React.Component {
+ render() {
+ return (
+ {this.context.t("{number} things!", {number: 13})}
+ )
+ }
+}
+
+TransWithNumberParams.contextTypes = {
+ t: React.PropTypes.func.isRequired
+}
+
+export default TransWithNumberParams