summaryrefslogtreecommitdiff
path: root/INTERPRETING.md
diff options
context:
space:
mode:
authorjugglinmike <mike@mikepennisi.com>2016-06-21 12:17:51 -0400
committerLeo Balter <leonardo.balter@gmail.com>2016-06-21 12:17:51 -0400
commit11d5b4f18be890810735f8e73ac975d1892116ff (patch)
treea904759739a9cd73a72f261ec6a932cdb735d360 /INTERPRETING.md
parent1e6cbbf7ba73b250e7f633d15febf4ec178077a4 (diff)
downloadqtdeclarative-testsuites-11d5b4f18be890810735f8e73ac975d1892116ff.tar.gz
Document requirements for module tests
Diffstat (limited to 'INTERPRETING.md')
-rw-r--r--INTERPRETING.md27
1 files changed, 26 insertions, 1 deletions
diff --git a/INTERPRETING.md b/INTERPRETING.md
index 8ebaa8e47..da51fcee3 100644
--- a/INTERPRETING.md
+++ b/INTERPRETING.md
@@ -75,6 +75,30 @@ semicolon (`;`) and newline character (`\n`):
This must precede any additional text modifications described by test metadata.
+### Modules
+
+Test262 includes tests for ECMAScript 2015 module code, denoted by the "module"
+metadata flag. Files bearing a name ending in `_FIXTURE.js` should not be
+interpreted as standalone tests; they are intended to be referenced by test
+files.
+
+All module specifiers used by Test262 begin with the character sequence `./`.
+The remaining characters should be interpreted as the name of a file within the
+same directory as the file under test. The contents of this file must be
+interpreted as UTF-8-encoded text and supplied to the Source Text Module
+Record's ParseModule abstract operation. The result of that operation must be
+returned by the implementation-defined HostResolveImportedModule directly.
+
+For example, consider a test file located at
+`test/language/import/nested/index.js` with the following contents:
+
+```js
+import * as ns from './dep.js';
+```
+
+Implementers should attempt to resolve this module specifier by loading a file
+located at `test/language/import/nested/dep.js`.
+
## Test Results
By default, tests signal failure by generating an uncaught exception. If
@@ -167,7 +191,8 @@ following strings:
In addition, this flag negates the default requirement to execute the test
both in strict mode and in non-strict mode. In other words, the
transformation described by the section titled "Strict Mode" must **not** be
- applied to these tests.
+ applied to these tests. Refer to the section titled "Modules" for more
+ information on interpreting these tests.
*Example*