Commit 16263aff authored by Tejesh's avatar Tejesh 🖖

update scales test case, remove unused dev dependency

parent 58c2751e
Pipeline #93681 canceled with stage
in 4 minutes and 7 seconds
......@@ -6,7 +6,7 @@ import babel from 'rollup-plugin-babel'
import babelrc from 'babelrc-rollup'
const babelConfig = {
'presets': ['es2015']
presets: ['es2015']
}
export default [
......@@ -162,7 +162,7 @@ export default [
commonjs(),
babel(babelrc({
config: {
'presets': ['env']
presets: ['env']
}, exclude: 'node_modules/**' })),
process.env.npm_lifecycle_event == 'dev' ? '' : uglify({ sourcemap: true })
],
......
......@@ -290,13 +290,14 @@
scale: 'Quantize',
range: { scheme: 'Purples', count: 3 }
})
// 0 - 33
// min_number is probably close to 0, max_number is probably close to 100
// [min_number, min_number + (min_number+difference)/3]
t.equal(quantize_scale(15), d3.schemePurples[3][0])
t.equal(quantize_scale(25), d3.schemePurples[3][0])
// 33.3 - 66
// [ min_number + (min_number+difference)/3, min_number + 2*(min_number+difference)/3]
t.equal(quantize_scale(40), d3.schemePurples[3][1])
t.equal(quantize_scale(65), d3.schemePurples[3][1])
// 66 - 100
t.equal(quantize_scale(45), d3.schemePurples[3][1])
// [2*(min_number+difference)/3, max_number]
t.equal(quantize_scale(70), d3.schemePurples[3][2])
......@@ -310,13 +311,14 @@
reverse: true
}
})
// 0 - 33
// min_number is probably close to 0, max_number is probably close to 100
// [min_number, min_number + (min_number+difference)/3]
t.equal(quantize_scale(15), d3.schemePurples[3][2])
t.equal(quantize_scale(25), d3.schemePurples[3][2])
// 33.3 - 66
// [ min_number + (min_number+difference)/3, min_number + 2*(min_number+difference)/3]
t.equal(quantize_scale(40), d3.schemePurples[3][1])
t.equal(quantize_scale(65), d3.schemePurples[3][1])
// 66 - 100
// [2*(min_number+difference)/3, max_number]
t.equal(quantize_scale(70), d3.schemePurples[3][0])
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment