@codecademy/codebytes 1.0.7-alpha.cf36309b1.0 → 1.0.7-alpha.dd1d54fc6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
6
6
 
7
7
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8
8
 
9
- import { renderHook } from '@testing-library/react';
9
+ import { renderHook } from '@testing-library/react-hooks';
10
10
  import { useEverInView } from './useEverInView';
11
11
  var mockUseIntersection = jest.fn();
12
12
  jest.mock('./useIntersection', function () {
@@ -6,7 +6,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
6
6
 
7
7
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8
8
 
9
- import { act, renderHook } from '@testing-library/react';
9
+ import { act, renderHook } from '@testing-library/react-hooks/dom';
10
10
  import { useIntersection } from './useIntersection';
11
11
  var originalIntersectionObserver = window.IntersectionObserver;
12
12
  var mockObserve = jest.fn();
@@ -111,9 +111,13 @@ describe('useIntersection', function () {
111
111
  expect(result.current).toEqual(fakeIntersectionObserverEntry); // We expect the results to remain the same after a rerender
112
112
 
113
113
  rerender();
114
- expect(result.current).toEqual(fakeIntersectionObserverEntry);
114
+ expect(result.current).toEqual(fakeIntersectionObserverEntry); // The results should be null after unmounting.
115
115
 
116
- case 9:
116
+ unmount();
117
+ rerender();
118
+ expect(result.current).toBeNull();
119
+
120
+ case 12:
117
121
  case "end":
118
122
  return _context3.stop();
119
123
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@codecademy/codebytes",
3
3
  "description": "Codebytes Editor",
4
- "version": "1.0.7-alpha.cf36309b1.0",
4
+ "version": "1.0.7-alpha.dd1d54fc6.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/tracking": "1.0.5-alpha.cf36309b1.0",
7
+ "@codecademy/tracking": "1.0.5-alpha.dd1d54fc6.0",
8
8
  "@monaco-editor/react": "^4.4.5",
9
9
  "js-base64": "^3.6.0",
10
10
  "jsuri": "^1.3.1",
@@ -39,5 +39,5 @@
39
39
  "dist/**/[A-Z]**/[A-Z]*.js",
40
40
  "dist/**/[A-Z]**/index.js"
41
41
  ],
42
- "gitHead": "641f985d1cddcf81d1d7caa8033430a7194ee2a4"
42
+ "gitHead": "9ab61def2dc5f3c54ca504109718c2ceda7de0d4"
43
43
  }