Upcoming Test Changes: define() test w/o dependencies, anon_relative

26 views
Skip to first unread message

Jakob Heuser

unread,
Mar 27, 2013, 8:00:19 PM3/27/13
to amd-im...@googlegroups.com
It was discovered that we didn't have tests for the following statement in the specification:
The dependencies argument is optional. If omitted, it should default to ["require", "exports", "module"]. However, if the factory function's arity (length property) is less than 3, then the loader may choose to only call the factory with the number of arguments corresponding to the function's arity or length.

We created the tests as part of the "basic" spec. However, this test did not exist, so some libraries are not compatible with this part of the specification. https://github.com/amdjs/amdjs-tests/issues/14 contains some very good discussion around the issue. To go live with this, we have temporarily disabled "basic" compliance for the RequireJS and lsjs libraries. These libraries are still compliant with the original set of "basic" tests, but we do not want people to see the test suite as failing on account of a missed test on our part. RequireJS and lsjs will address these items and update their implemented object when resolved.

The second change resolves https://github.com/amdjs/amdjs-tests/issues/13 which was relying on universal config() for adjusting paths instead of just testing relative module IDs. The use of path creates a new test that says "if using config() to adjust the module's resolving URL, relative paths must remain relative to the module ID and not its URL". This new test config_paths_relative was turned on for all frameworks who are already passing. There was no frameworks who were not in compliance with this.

Before committing these, however, we wanted to ensure there was no further discussion on these items.

The proposed pull request is at
https://github.com/amdjs/amdjs-tests/pull/17

Hopefully we can close discussion by Sunday or sooner and move forward.

--Jakob

Richard Backhouse

unread,
Mar 28, 2013, 6:00:38 AM3/28/13
to amd-im...@googlegroups.com
+1 on this. I'll fix lsjs when it's pulled in.

Richard
--
You received this message because you are subscribed to the Google Groups "amd-implement" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amd-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

James Burke

unread,
Mar 28, 2013, 1:22:18 PM3/28/13
to amd-im...@googlegroups.com
+1 for merging. You can enable the test for requirejs, and like
Richard, will be fixing it soon enough.

Jakob Heuser

unread,
Mar 28, 2013, 7:56:14 PM3/28/13
to amd-im...@googlegroups.com
Thanks all. I've merged the new tests in.


--Jakob


You received this message because you are subscribed to a topic in the Google Groups "amd-implement" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/amd-implement/TVVVp5JTkWE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to amd-implemen...@googlegroups.com.

Richard Backhouse

unread,
Mar 29, 2013, 10:03:12 AM3/29/13
to amd-im...@googlegroups.com
Jakob,

I think there is an issue with the new test. It's assuming that loaders are following factory-on-define pattern and this won't work for loaders using factory-on-require. I posted a comment on https://github.com/amdjs/amdjs-tests/pull/17 with a possible solution for the test. Let me know what you think

Richard
Reply all
Reply to author
Forward
0 new messages