11import test from "ava" ;
22import fs from "fs" ;
33import path from "path" ;
4- import assign from "object-assign" ;
54import rimraf from "rimraf" ;
65import webpack from "webpack" ;
76import createTestDirectory from "./helpers/createTestDirectory" ;
@@ -26,7 +25,7 @@ const globalConfig = {
2625 loader : babelLoader ,
2726 options : {
2827 metadataSubscribers : [ ReactIntlPlugin . metadataContextFunctionName ] ,
29- plugins : [ [ "react-intl" , { enforceDescriptions : false } ] ] ,
28+ plugins : [ "react-intl" ] ,
3029 presets : [ ] ,
3130 } ,
3231 exclude : / n o d e _ m o d u l e s / ,
@@ -48,7 +47,7 @@ test.beforeEach.cb(t => {
4847test . afterEach . cb ( t => rimraf ( t . context . directory , t . end ) ) ;
4948
5049test . cb ( "should pass metadata code snippet" , t => {
51- const config = assign ( { } , globalConfig , {
50+ const config = Object . assign ( { } , globalConfig , {
5251 output : {
5352 path : t . context . directory ,
5453 filename : "[id].metadata.js" ,
@@ -65,7 +64,7 @@ test.cb("should pass metadata code snippet", t => {
6564 t . true ( files . length > 0 ) ;
6665 fs . readFile (
6766 path . resolve ( t . context . directory , "reactIntlMessages.json" ) ,
68- function ( err , data ) {
67+ function ( err , data ) {
6968 t . is ( err , null ) ;
7069 const text = data . toString ( ) ;
7170 const jsonText = JSON . parse ( text ) ;
@@ -80,7 +79,7 @@ test.cb("should pass metadata code snippet", t => {
8079} ) ;
8180
8281test . cb ( "should not throw error" , t => {
83- const config = assign ( { } , globalConfig , {
82+ const config = Object . assign ( { } , globalConfig , {
8483 output : {
8584 path : t . context . directory ,
8685 filename : "[id].metadata.js" ,
@@ -96,7 +95,7 @@ test.cb("should not throw error", t => {
9695} ) ;
9796
9897test . cb ( "should throw error" , t => {
99- const config = assign ( { } , globalConfig , {
98+ const config = Object . assign ( { } , globalConfig , {
10099 output : {
101100 path : t . context . directory ,
102101 filename : "[id].metadata.js" ,
@@ -113,7 +112,7 @@ test.cb("should throw error", t => {
113112} ) ;
114113
115114test . cb ( "should pass metadata code snippet ( cache version )" , t => {
116- const config = assign ( { } , globalConfig , {
115+ const config = Object . assign ( { } , globalConfig , {
117116 output : {
118117 path : t . context . directory ,
119118 filename : "[id].metadata.js" ,
@@ -125,7 +124,7 @@ test.cb("should pass metadata code snippet ( cache version )", t => {
125124 loader : babelLoader ,
126125 options : {
127126 metadataSubscribers : [ ReactIntlPlugin . metadataContextFunctionName ] ,
128- plugins : [ [ "react-intl" , { enforceDescriptions : false } ] ] ,
127+ plugins : [ "react-intl" ] ,
129128 cacheDirectory : cacheDir ,
130129 presets : [ ] ,
131130 } ,
@@ -145,7 +144,7 @@ test.cb("should pass metadata code snippet ( cache version )", t => {
145144 t . true ( files . length > 0 ) ;
146145 fs . readFile (
147146 path . resolve ( t . context . directory , "reactIntlMessages.json" ) ,
148- function ( err , data ) {
147+ function ( err , data ) {
149148 t . is ( err , null ) ;
150149 const text = data . toString ( ) ;
151150 const jsonText = JSON . parse ( text ) ;
0 commit comments