}
}
},
+ "requirejs": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
+ "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
+ "dev": true
+ },
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"homepage": "http://foundation.zurb.com/sites",
"scripts": {
"start": "gulp",
- "test": "npm run test:sass && npm run test:javascript:units",
+ "test": "npm run test:sass && npm run test:javascript:units && npm run test:bundle",
"test:ci": "npm run test:sass && npm run test:javascript:ci",
"test:sass": "mocha test/sass/test_sass.js --colors",
"test:javascript:transpile": "gulp sass:foundation --color && gulp test:transpile-js --color",
"test:javascript:units": "npm run test:javascript:transpile && mocha-headless-chrome -a ignore-resource-errors -a no-sandbox -f test/javascript/index.html",
"test:javascript:browserstack": "npm run test:javascript:transpile && browserstack-runner",
"test:javascript:ci": "npm run test:javascript:transpile && mocha-headless-chrome -a ignore-resource-errors -a no-sandbox -f test/javascript/index.html && browserstack-runner",
+ "test:bundle": "mocha-headless-chrome -a ignore-resource-errors -a no-sandbox -f test/bundle/index.html",
"test:visual": "gulp test --color",
"lockdeps": "npm i && rimraf yarn.lock && yarn import && rimraf shrinkwrap.yaml && pnpm import",
"relockdeps": "rimraf package-lock.json && npm run lockdeps",
"parker": "^1.0.0-alpha.0",
"prettyjson": "^1.1.3",
"require-dir": "^1.0.0",
+ "requirejs": "^2.3.6",
"rimraf": "^2.6.1",
"rollup": "^0.65.2",
"rollup-plugin-babel": "^4.0.3",
--- /dev/null
+<!DOCTYPE html>
+<html>
+
+ <head>
+ <title>Mocha</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <script src="../../node_modules/chai/chai.js"></script>
+ <script src="../../node_modules/requirejs/require.js"></script>
+ <script src="../../node_modules/jquery/dist/jquery.js"></script>
+ <script src="../../node_modules/mocha/mocha.js"></script>
+ <link rel="stylesheet" href="../../node_modules/mocha/mocha.css" />
+ <link rel="stylesheet" href="../../_build/assets/css/foundation-float.css">
+ <link rel="stylesheet" href="../../node_modules/motion-ui/dist/motion-ui.css">
+ </head>
+
+ <body>
+
+ <div id="mocha"></div>
+
+ <script>
+ mocha.setup({
+ ui: 'bdd',
+ timeout: 5000,
+ });
+
+ chai.should();
+
+ requirejs.config({
+ deps: ['test_bundle'],
+ callback: mocha.run
+ });
+ </script>
+
+ </body>
+</html>
--- /dev/null
+describe('Foundation bundle', function() {
+
+ it('can be imported via AMD', function (done) {
+
+ require(['../../_build/assets/js/foundation'], function(foundation) {
+ foundation.Foundation.should.be.an('object');
+ done();
+ }, function (err) {
+ if (err) throw err;
+ });
+
+ });
+
+});