The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / test / simple / test-module-loading.js @ 6f043940

History | View | Annotate | Download (10.2 KB)

# Date Author Comment
47f3fc9a 01/16/2013 03:27 PM isaacs

test: add module-loading test with empty string

7465cf91 01/16/2013 03:25 PM Felix Böhm

module: assert that require() is called with a string

as requested in #4577

b27a4cbe 06/11/2012 08:04 PM Bert Belder

test-module-loading: convert backslashes to forward slashes

This makes the test pass on Windows.

a10cfba7 03/12/2012 01:27 PM isaacs

module: remove 'exited', replace 'children' array

7335a423 11/04/2011 09:05 PM Igor Zinkovsky

fix test-module-loading on windows

850609ea 11/02/2011 07:38 PM Ryan Dahl

Remove separation of libuv tests

018e110c 10/14/2011 07:08 PM Ben Noordhuis

test: replace .addListener() calls with .on()

87286cc7 10/05/2011 09:51 PM Colton Baker

Fixed a lot of jslint errors.

Fixes #1831

4e1d6fca 08/24/2011 02:45 AM Ryan Dahl

Mark tests which are broken in libuv

ac722bbe 08/04/2011 10:52 AM Ben Noordhuis

module: strip byte order marker when loading *.js and *.json files

BOMs make V8 raise a 'SyntaxError: Unexpected token ILLEGAL' exception.

Fixes #1440.

703a1ffe 07/29/2011 02:56 PM isaacs

Revert "AMD compatibility for node"

This reverts commit 9967c369c9272335bb0343558673b689725c6d7c.

Conflicts:

test/simple/test-module-loading.js
588d885e 07/20/2011 08:39 PM isaacs

Close #1357 Load json files with require()

Signed off by everybody.

7f0047c2 07/15/2011 06:11 PM isaacs

Close #1348 Remove require.paths

Module.globalPaths is still set to a read-only copy of the global
include paths pulled off of the NODE_PATH environment variable.

It's important to be able to inspect this, but modifying it no longer
has any effect.

9b5098f5 07/14/2011 05:25 PM isaacs

Close #1281 Make require a public member of module

Reviewed by @felixge

9967c369 06/13/2011 07:11 PM isaacs

AMD compatibility for node, with docs and tests

Closes #1173
Closes #1170

55048cdf 03/14/2011 08:37 PM Ryan Dahl

Update copyright headers

f8defa3e 02/18/2011 01:43 PM isaacs

package.json main as indexed subdir

Closes GH-686.

46513483 02/09/2011 05:24 PM isaacs

node_modules module lookup, +docs and test.

da2f4b2d 02/07/2011 02:00 PM isaacs

support for package.json

This adds basic support for situations where there is a package.json
with a "main" field. That "main" module is used as the code that is
loaded when the package folder is required.

f86ec136 02/02/2011 02:18 PM isaacs

Closes GH-619 Make require.main be the main module

fbb74784 01/27/2011 08:02 PM Ryan Dahl

Remove more process.assert

6cdeb3b3 01/27/2011 05:02 PM isaacs

A module ID with a trailing slash must be a dir.

require('./foo/') should not try to load './foo.js'. It should only
look for ./foo/index.js

Closes GH-588

0ce9cbab 12/05/2010 12:28 PM Oleg Efimov

GJSLint continue

a0159b4b 12/04/2010 06:58 PM Ryan Dahl

Fix global leaks

c4f8f871 12/03/2010 07:00 PM Anders Conbere

adding module tests for .js and bare files

Currently the module tests don't cover the cases for when a user
requires a file with a request that includes the extension, and for a
request to a file with no extensions.

ex.

require("./a.js") // not tested
require("./foo") // (not tested with trying to load a file named ./foo)

dff1b5ad 09/22/2010 01:13 PM isaacs

Don't try to run extension loaders unless they're actually functions

0f16af7e 09/20/2010 12:56 PM Tim-Smart

Remove registerExtension, add .extensions. Tests.

Updated extensions tests

bb08f0c2 09/19/2010 07:52 PM isaacs

Remove require.async

This patch removes require.async from nodejs.

1. It complicated the code unnecessarily.
2. Everyone uses sync require anyway.
3. It's got a lot of weird edge cases when mixed with sync require.
4. It is many months behind the commonjs spec anyhow.

92533338 08/18/2010 02:46 PM Herbert Vojčík

Fix registerExtension for NODE_MODULE_CONTEXTS

Fix of registerExtension-produced non-string module loading with own
context. Plus finishing touches to the test.

cf2b206a 08/17/2010 11:41 AM Herbert Vojčík

More changes to tests so they really work under context module loader.

Plus, getting rid of test/common.js defining things in global.

03123435 08/13/2010 11:13 AM Ryan Dahl

Remove platform specific asserts

0a3eff80 08/04/2010 07:03 PM Nick Stenning

Standardise module load order for native and registered file extensions.

This patch standardises the load order for modules. Highest priority is trying to load exactly the file the user specified, followed by native extensions, followed by registered extra extensions, etc....

78520ba4 08/04/2010 06:55 PM Nick Stenning

Don't attempt to load a directory.

This patch replaces the path.exists check for module loading with a call to
fs.statSync (or fs.stat for require.async) which ensures that it's not trying
to load a directory.

d75b63bc 07/20/2010 01:26 PM isaacs

Support including modules that don't have an extension.

This way, require("/foo") will work if there is a "foo.js", or a file named
simply "foo" with no extension.

49e0f14a 07/19/2010 05:17 PM isaacs

Cache modules based on filename rather than ID

This is ever so slightly less efficient than caching based on ID, since the
filename has to be looked up before we can check the cache. However, it's
the most minimal approach possible to get this change in place. Since...

9fd5e3c8 07/15/2010 05:21 PM Ryan Dahl

Update tests to work with module contexts

2085909a 07/13/2010 08:15 PM David Siegel

fix corner-case bug in Module

and added a test to expose it

ba792ea2 06/23/2010 11:05 PM Ryan Dahl

:%s/sys.puts/console.log/g

and there was much rejoicing

c16508c8 04/08/2010 11:17 AM Herbert Vojcik

Better require.async throw test

d36bb653 04/07/2010 02:47 PM Herbert Vojcik

Better require.async tests

0c17067d 03/12/2010 01:00 AM Tim-Smart

Add require.registerExtension

5861db8a 03/08/2010 08:57 PM isaacs

Remove process.mixin dependency from all tests.

44dde5f2 03/08/2010 01:20 PM Felix Geisendörfer

Remove fs/path globals from test suite

It is way too easy to not notice bugs due to those modules being
exported as globals while running the test suite.

See: http://github.com/ry/node/issues#issue/75

04fac198 02/25/2010 02:41 PM arlolra

Split tests.