Skip to content

Commit

Permalink
Made a big refactoring: wrap the whole function into an AMD (require.…
Browse files Browse the repository at this point in the history
…js). Devidet the functions in extra modules. They work fine together, but have got the problem that has() and is() will not go into global when assert is loaded, this should they do. its useless, when i have to load has or is next to assert, thats boring
  • Loading branch information
ElectricMaxxx committed Jul 18, 2013
1 parent b5fb235 commit 8674849
Show file tree
Hide file tree
Showing 26 changed files with 5,275 additions and 944 deletions.
9 changes: 9 additions & 0 deletions .idea/client-assertthat.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#Assert testing in DOM with a version of node-assertthat

#Important Notice

cause of code refactoring is client-assertthat almost useless at the moment.
I am trying to wrap the test framework into require.js

this will be a client version of
https://github.com/goloroden/node-assertthat

Expand Down
38 changes: 38 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Config area for client-assertthat
* for questions of configuration have a look to: http://requirejs.org/docs/api.html
*
* did not realy know if i will realy need jquery, hope not
*
* Created by
* @author Maximilian Berghoff
*/

require.config({
baseUrl: "",
paths: {
assert: 'lib/assert',
jquery: 'lib/jquery/jquery',
mocha: 'lib/mocha/mocha',
is:'lib/is',
has:'lib/has'
},
shim:{
mocha:{
deps:['jquery']

}
}
});

/**
* define your test in here
*/
require(['require','mocha'],function(require){
mocha.setup('tdd');
require([
'test/has/attribute'
],function(require){
mocha.run();
});
});
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Client-Assertthat</title>
<link rel="stylesheet" type="text/css" href="css/mocha.css" />
</head>

<body>
<div id="mocha"></div>
<script type="text/javascript" src="lib/require/require.js" data-main="config"></script>
</body>
</html>
Loading

0 comments on commit 8674849

Please sign in to comment.