Skip to content

Instantly share code, notes, and snippets.

@tamascsaba
Forked from jugglinmike/test-cases.md
Created April 7, 2014 09:42
Show Gist options
  • Save tamascsaba/10017373 to your computer and use it in GitHub Desktop.
Save tamascsaba/10017373 to your computer and use it in GitHub Desktop.

Valid Module Definition Formats

  • ES6
    • with dependencies
      • export default + assignment expression
      • export + declaration
    • without dependencies
      • export default + assignment expression
      • export + declaration
  • Common JS
    • with dependencies
      • module.exports = + value
      • exports[ + name + ] = + value
    • without dependencies
      • module.exports = + value
      • exports[ + name + ] = + value
  • AMD - define
    • with dependencies
      • module.exports = + value
      • exports[ + name + ] = + value
      • return + value
      • literal values
    • without dependencies
      • module.exports = + balue
      • exports[ + name + ] = + value
      • return + value
      • literal values
  • AMD - require
    • with dependencies
      • with config object
      • without config object
    • without dependencies
      • with config object
      • without config object

Test Cases

Dependency specification

  • ES6
    • Default
    • Named
    • Renaming
  • Common JS
    • require
  • AMD - define
    • Dependency list
    • require
  • AMD - require
    • Dependency list
    • require

Exporting

  • ES6
    • export default + assignment expression
    • export + declaration
  • Common JS
    • module.exports = + value
    • exports[ + name + ] = + value
  • AMD - define
    • module.exports = + value
    • exports[ + name + ] = + value
    • return + value
    • literal values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment