* Remove duplicate test
The behavior under test is verified by another file in Test262:
test/language/expressions/compound-assignment/S11.13.2_A2.1_T3.3.js
That version is preferable because it does not depend on `eval` and
because it supports both strict and non-strict mode.
* Remove overly-permissive test
By asserting only the presence of an "own" property, this test can be
satisfied from both strict mode code and non-strict mode code.
The following test verifies the presence of the "own" property and the
associated descriptor's values in strict mode:
test/language/arguments-object/10.6-13-c-3-s.js
That subsumes the semantics verified by this test, making it
superfluous. Remove the test.
* Remove overly-permissive test
By asserting only the absence of a syntax error, this test can be
satisfied from both strict mode code and non-strict mode code.
The following test verifies the runtime behavior of accessing the
property in strict mode code:
test/language/arguments-object/10.6-13-c-1-s.js
That subsumes the semantics verified by this test, making it
superfluous. Remove the test.
* Remove duplicate test
The behavior under test is verified by another file in Test262:
test/built-ins/Math/prop-desc.js
That version is preferable because it follows the test suite's
convention for testing property descriptors and because it supports both
strict and non-strict mode.
* Remove duplicate test
The behavior under test is verified by two separate files:
test/language/statements/function/line-terminator-non-strict.js
test/language/statements/function/line-terminator-strict.js
These files differ only in their usage of the `noStrict`/`onlyStrict`
metadata. Because tests are intended to be interpreted in both modes by
default, these can be expressed with a single file that does not limit
the permissible modes.
Prior to this commit, the descriptors of the constructor properties of
the global object were verified inconsistently, many independent
assertions occured in the same file, and that file test was poorly
located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
Prior to this commit, the descriptors of the function properties of the
global object were verified inconsistently, many independent assertions
occured in the same file, and that file test was poorly located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
Prior to this commit, the enumerability of the value properties of the
global object were only verified in strict mode, the assertions occured
in the same file, and that file test was poorly located.
Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
The modified tests are equally valid in strict mode and outside of
strict mode. Remove the flag which limits their use to only one of these
two contexts. Rename tests using the legacy ES5-based naming scheme to
remove the pattern which designates strict mode.
test/annexB/built-ins/Date/prototype/setYear/time-clip.js
test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
- Don't try to test time-clip at the end points, because this is near
impossible to get right (needs to consider time zone offset, dst, local
mean time because of Africa/Monrovia, etc.).
test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
- Wasn't update to expect RangeError
test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
- Change ClassDeclaration -> ClassExpression to get completion value
test/built-ins/Function/prototype/toString/AsyncFunction.js
- Add missing \n in expected string
- Also fixed in gh-847
test/built-ins/global/global-object.js
- Add 'var' to make test pass in strict-mode
test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js
- This is allowed in sloppy mode when Annex B is implemented
test/language/expressions/async-generators/expression-yield-as-statement.js
- Fix calls to then()
test/language/module-code/namespace/internals/own-property-keys-binding-types.js
test/language/module-code/namespace/internals/own-property-keys-sort.js
- Tests weren't updated after removal of @@iterator from module
namespace objects
test/language/module-code/namespace/internals/set-prototype-of-null.js
- Fix syntax error
test/language/statements/async-function/early-errors-no-async-generator.js
- No longer valid now that async iteration proposal is at stage 3
The `negative` frontmatter tag expresses an expectation for the behavior
of the test file as a whole. The `assert.throws` helper function offers
more fine-grained control over expectations because it may be applied to
specific statements and expressions. This makes it preferable in cases
where it may be used (i.e. when the test body does not describe a syntax
error or early error).
Re-implement assertions for errors to use the `assert.throws` helper
function wherever possible.
Some tests specifically concern the application of the `use strict`
directive as it appears in JavaScript source code. These tests should
*not* be run with the `onlyStrict` flag because relying on the test
runner to enable strict mode makes the semantics of the source code
irrelevant. Update these tests to use the `noStrict` flag.
Other tests concern language semantics that are only valid in strict
mode, but the mechanism for enabling strictness is inconseqential.
Update these tests to use the `onlyStrict` flag and remove any redundant
`use strict` directive prologues contained within.
Still other tests are valid both within and outside of strict mode.
In keeping with the majority of other tests, do not specify any
restrictions on the environments in which these tests may be run.
- Add missing ".prototype" lookup in Array.prototype tests (Follow-up of #280)
- Add noStrict flag in global/S10.2.3_A2.2_*.js (implicit this-binding is part of the test)
- Provide correct this-binding in function/13.2-*.js
- Add missing assert.throws in "set-iterator-close-after-add-failure.js"