Copy and paste no-jsx note from top of file to places where it's used
Closes #6157
Max committed
Mar 1, 2016 at 20:06 UTC
32b0c62214c896ef937e77906c45d402fb46b7d8
1 file changed
+14
-3
src/isomorphic/classic/element/__tests__/ReactElement-test.js
+14
-3
@@ -11,9 +11,6 @@
11
12
'use strict';
13
14
-// NOTE: We're explicitly not using JSX in this file. This is intended to test
15
-// classic JS without JSX.
16
-
14
var React;
15
var ReactDOM;
16
var ReactTestUtils;
@@ -33,6 +30,8 @@ describe('ReactElement', function() {
30
React = require('React');
31
ReactDOM = require('ReactDOM');
32
ReactTestUtils = require('ReactTestUtils');
33
+ // NOTE: We're explicitly not using JSX here. This is intended to test
34
+ // classic JS without JSX.
35
ComponentClass = React.createClass({
36
render: function() {
37
return React.createElement('div');
@@ -222,6 +221,8 @@ describe('ReactElement', function() {
221
expect(console.error.argsForCall.length).toBe(0);
222
});
223
224
+ // NOTE: We're explicitly not using JSX here. This is intended to test
225
+ // classic JS without JSX.
226
it('allows static methods to be called using the type property', function() {
227
spyOn(console, 'error');
228
@@ -244,6 +245,8 @@ describe('ReactElement', function() {
245
expect(console.error.argsForCall.length).toBe(0);
246
});
247
248
+ // NOTE: We're explicitly not using JSX here. This is intended to test
249
+ // classic JS without JSX.
250
it('identifies valid elements', function() {
251
var Component = React.createClass({
252
render: function() {
@@ -283,12 +286,16 @@ describe('ReactElement', function() {
286
expect(typeof Component.specialType.isRequired).toBe('function');
287
});
288
289
+ // NOTE: We're explicitly not using JSX here. This is intended to test
290
+ // classic JS without JSX.
291
it('is indistinguishable from a plain object', function() {
292
var element = React.createElement('div', {className: 'foo'});
293
var object = {};
294
expect(element.constructor).toBe(object.constructor);
295
});
296
297
+ // NOTE: We're explicitly not using JSX here. This is intended to test
298
+ // classic JS without JSX.
299
it('should use default prop value when removing a prop', function() {
300
var Component = React.createClass({
301
getDefaultProps: function() {
@@ -310,6 +317,8 @@ describe('ReactElement', function() {
317
expect(instance.props.fruit).toBe('persimmon');
318
});
319
320
+ // NOTE: We're explicitly not using JSX here. This is intended to test
321
+ // classic JS without JSX.
322
it('should normalize props with default values', function() {
323
var Component = React.createClass({
324
getDefaultProps: function() {
@@ -404,6 +413,8 @@ describe('ReactElement', function() {
413
expect(console.error.argsForCall.length).toBe(0);
414
});
415
416
+ // NOTE: We're explicitly not using JSX here. This is intended to test
417
+ // classic JS without JSX.
418
it('identifies elements, but not JSON, if Symbols are supported', function() {
419
// Rudimentary polyfill
420
// Once all jest engines support Symbols natively we can swap this to test