react-perf-tool
Advanced tools
Comparing version 0.1.4 to 0.1.5
{ | ||
"name": "react-perf-tool", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Record and debug React performance from the browser", | ||
@@ -5,0 +5,0 @@ "main": "lib/react-perf-tool.js", |
@@ -22,4 +22,4 @@ import React, { Component } from 'react'; | ||
renderChart(measurements) { | ||
const data = measurements.map(measurement => measurement['Wasted time (ms)']); | ||
const labels = measurements.map(measurement => measurement['Owner > component']); | ||
const data = measurements.map(measurement => measurement.inclusiveRenderDuration); | ||
const labels = measurements.map(measurement => measurement.key); | ||
this.chart = new Chart(document.getElementById('perf-tool-chart-ctx'), { | ||
@@ -26,0 +26,0 @@ type: 'bar', |
@@ -5,3 +5,3 @@ import fecha from 'fecha'; | ||
export default function formatTime(time) { | ||
return fecha.format(new Date(time), 'hh:mm:ss.SSS A'); | ||
return (new Date(time)).toTimeString().split(' ')[0]; | ||
} |
import { expect } from 'chai'; | ||
import formatTime from '../../src/utils/formatTime'; | ||
xdescribe('formatTime', () => { | ||
it('should return 12:23:02.741 PM for 1463394182741', () => { | ||
expect(formatTime(1463394182741)).to.equal('12:23:02.741 PM'); | ||
describe('formatTime', () => { | ||
it('should return 12:23:02 for 1463394182741', () => { | ||
expect(formatTime(1463394182741)).to.equal('12:23:02'); | ||
}); | ||
}); |
@@ -5,3 +5,3 @@ import { expect } from 'chai'; | ||
describe.only('setUserSettings', () => { | ||
describe('setUserSettings', () => { | ||
it('should return return a settings object from mock storage', () => { | ||
@@ -8,0 +8,0 @@ const localStorage = { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5527751
48
28271