Dep upgrades, test upgrades
parent
e8dfc65bc8
commit
f37861eb08
|
@ -18,7 +18,7 @@ export class BoardType extends React.Component<BoardTypeProps, BoardTypeState> {
|
|||
sending: this.sending
|
||||
};
|
||||
|
||||
componentWillReceiveProps() {
|
||||
UNSAFE_componentWillReceiveProps() {
|
||||
this.setState({ sending: this.sending });
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ export class ImageFilterMenu
|
|||
this.updateState();
|
||||
}
|
||||
|
||||
componentWillReceiveProps() {
|
||||
UNSAFE_componentWillReceiveProps() {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ export class CreatePoints
|
|||
this.state = {};
|
||||
}
|
||||
|
||||
componentWillReceiveProps() {
|
||||
UNSAFE_componentWillReceiveProps() {
|
||||
this.getPointData();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,11 +16,22 @@ jest.unmock("../cached_crop");
|
|||
import { cachedCrop } from "../cached_crop";
|
||||
|
||||
describe("cachedIcon()", () => {
|
||||
it("", () => {
|
||||
|
||||
});
|
||||
|
||||
it("does an HTTP request if the icon can't be found locally", (done) => {
|
||||
|
||||
cachedCrop("lettuce")
|
||||
.then((item) => {
|
||||
expect(item.svg_icon).toContain("<svg>Wow</svg>");
|
||||
done();
|
||||
.then((item1) => {
|
||||
expect(item1.svg_icon).toContain("<svg>Wow</svg>");
|
||||
cachedCrop("lettuce").then((item2) => {
|
||||
/** Ensure that cache is actually being used: */
|
||||
expect(item2.slug).toBe(item1.slug);
|
||||
expect(item2.svg_icon).toBe(item1.svg_icon);
|
||||
expect(item2.spread).toBe(undefined);
|
||||
done();
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
expect(error).toBeFalsy();
|
||||
|
|
|
@ -16,7 +16,7 @@ export class FallbackImg extends React.Component<Props, State> {
|
|||
|
||||
state: State = { needsFallback: false };
|
||||
|
||||
componentWillReceiveProps(next: Props) {
|
||||
UNSAFE_componentWillReceiveProps(next: Props) {
|
||||
// Sorry. The webcam page needs live updates. <img/> tag was acting wonky.
|
||||
(next.src !== this.props.src) && this.setState({ needsFallback: false });
|
||||
}
|
||||
|
|
|
@ -56,13 +56,13 @@
|
|||
"parcel-bundler": "1.12.3",
|
||||
"promise-timeout": "1.3.0",
|
||||
"raf": "3.4.1",
|
||||
"react": "16.8.6",
|
||||
"react": "16.9.0",
|
||||
"react-addons-test-utils": "15.6.2",
|
||||
"react-color": "2.17.3",
|
||||
"react-dom": "16.8.6",
|
||||
"react-dom": "16.9.0",
|
||||
"react-joyride": "2.1.1",
|
||||
"react-redux": "7.1.0",
|
||||
"react-test-renderer": "16.8.6",
|
||||
"react-redux": "7.1.1",
|
||||
"react-test-renderer": "16.9.0",
|
||||
"react-transition-group": "4.2.2",
|
||||
"redux": "4.0.4",
|
||||
"redux-immutable-state-invariant": "2.1.0",
|
||||
|
|
Loading…
Reference in New Issue