Replace Karma + Jasmine with Jest

This commit is contained in:
Tyler Long
2018-03-10 08:42:59 +08:00
parent cbb884edae
commit d904574ea8
7 changed files with 143 additions and 1895 deletions

34
__mocks__/d3.js vendored Normal file
View File

@@ -0,0 +1,34 @@
let NewD3 = function () {
return {
append: function () {
return NewD3()
},
attr: function () {
return this
},
style: function () {
return this
},
text: function () {
return this
},
0: {
0: {
getBBox: function () {
return {
height: 10,
width: 20
}
}
}
}
}
}
export const select = function () {
return new NewD3()
}
export const selectAll = function () {
return new NewD3()
}