-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
173 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2020-2021, University of Colorado Boulder | ||
|
||
/** | ||
* Unit tests for ratio-and-proportion. | ||
* | ||
* @author | ||
*/ | ||
|
||
import qunitStart from '../../chipper/js/sim-tests/qunitStart.js'; | ||
|
||
QUnit.test( 'helloWorld', assert => { | ||
assert.ok( true, 'hello world passed' ); | ||
} ); | ||
|
||
qunitStart(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<!DOCTYPE HTML> | ||
<!-- Top-level HTML file for mean-share-and-balance generated by 'grunt generate-development-html' --> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1"/> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="phet-sim-level" content="development"> | ||
<link rel="stylesheet" href="../sherpa/lib/qunit-2.10.0.css"> | ||
<title>mean-share-and-balance</title> | ||
</head> | ||
|
||
<!-- body is only made black for the loading phase so that the splash screen is black --> | ||
<body> | ||
<div id="qunit"></div> | ||
<div id="qunit-fixture"></div> | ||
|
||
<script type="text/javascript"> | ||
|
||
window.phet = window.phet || {}; | ||
window.phet.chipper = window.phet.chipper || {}; | ||
window.phet.chipper.packageObject = | ||
{ | ||
"name": "mean-share-and-balance", | ||
"version": "1.0.0-dev.4", | ||
"license": "GPL-3.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/phetsims/mean-share-and-balance.git" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~1.5.3" | ||
}, | ||
"phet": { | ||
"requirejsNamespace": "MEAN_SHARE_AND_BALANCE", | ||
"simulation": true, | ||
"runnable": true, | ||
"supportedBrands": [ | ||
"phet", | ||
"adapted-from-phet", | ||
"phet-io" | ||
], | ||
"generatedUnitTests": true, | ||
"supportsOutputJS": true, | ||
"simFeatures": { | ||
"supportsInteractiveDescription": true | ||
} | ||
}, | ||
"eslintConfig": { | ||
"extends": "../chipper/eslint/sim_eslintrc.js", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.ts" | ||
], | ||
"rules": { | ||
"@typescript-eslint/explicit-member-accessibility": "error", | ||
"@typescript-eslint/no-explicit-any": "error" | ||
} | ||
} | ||
] | ||
} | ||
}; | ||
window.phet.chipper.stringRepos = | ||
[ | ||
{ | ||
"repo": "joist", | ||
"requirejsNamespace": "JOIST" | ||
}, | ||
{ | ||
"repo": "mean-share-and-balance", | ||
"requirejsNamespace": "MEAN_SHARE_AND_BALANCE" | ||
}, | ||
{ | ||
"repo": "scenery-phet", | ||
"requirejsNamespace": "SCENERY_PHET" | ||
}, | ||
{ | ||
"repo": "sun", | ||
"requirejsNamespace": "SUN" | ||
}, | ||
{ | ||
"repo": "tambo", | ||
"requirejsNamespace": "TAMBO" | ||
}, | ||
{ | ||
"repo": "twixt", | ||
"requirejsNamespace": "TWIXT" | ||
} | ||
]; | ||
|
||
// Identify the brand (assume generated brand if not provided with query parameters) | ||
const brandMatch = location.search.match( /brand=([^&]+)/ ); | ||
const brand = brandMatch ? decodeURIComponent( brandMatch[ 1 ] ) : 'adapted-from-phet'; | ||
|
||
// Preloads, with more included for phet-io brand | ||
let preloads = [ | ||
'../sherpa/lib/jquery-2.1.0.js', | ||
'../sherpa/lib/lodash-4.17.4.js', | ||
'../sherpa/lib/FileSaver-b8054a2.js', | ||
'../sherpa/lib/himalaya-1.1.0.js', | ||
'../sherpa/lib/flatqueue-1.2.1.js', | ||
'../sherpa/lib/he-1.1.1.js', | ||
'../assert/js/assert.js', | ||
'../query-string-machine/js/QueryStringMachine.js', | ||
'../chipper/js/initialize-globals.js', | ||
'../sherpa/lib/seedrandom-2.4.2.js', | ||
'../sherpa/lib/base64-js-1.2.0.js', | ||
'../sherpa/lib/TextEncoderLite-3c9f6f0.js', | ||
'../tandem/js/PhetioIDUtils.js', | ||
'../perennial-alias/js/common/SimVersion.js', | ||
'../sherpa/lib/qunit-2.10.0.js', | ||
'../chipper/js/sim-tests/qunit-connector.js' | ||
]; | ||
|
||
if ( brand === 'phet-io' ) { | ||
preloads = preloads.concat( [ | ||
'../chipper/js/phet-io/phetioCompareAPIs.js', | ||
'../phet-io/js/phet-io-initialize-globals.js' | ||
] ); | ||
} | ||
|
||
// Loads a synchronously-executed asynchronously-downloaded script tag, with optional data-main parameter. | ||
// See http://www.html5rocks.com/en/tutorials/speed/script-loading/ for more about script loading. It helps to | ||
// load all of the scripts with this method, so they are treated the same (and placed in the correct execution | ||
// order). | ||
const loadURL = ( preloadURL, type = 'text/javascript' ) => { | ||
const script = document.createElement( 'script' ); | ||
script.type = type; | ||
script.src = preloadURL; | ||
script.async = false; | ||
script.setAttribute( 'crossorigin', 'use-credentials' ); | ||
document.head.appendChild( script ); | ||
}; | ||
|
||
// Kick off string loading immediately | ||
loadURL( '../chipper/js/load-unbuilt-strings.js' ); | ||
|
||
// Queue all of the preloads to be loaded. | ||
preloads.forEach( preload => loadURL( preload ) ); | ||
|
||
// Module loading in compilation-free (development) mode will be kicked off once strings are loaded. | ||
// This is done in load-unbuilt-strings.js | ||
window.phet.chipper.loadModules = () => loadURL( '../chipper/dist/js/mean-share-and-balance/js/mean-share-and-balance-tests.js', 'module' ); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters