Skip to content

Commit

Permalink
adding thirdparty library template ready when for #743 is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Berry committed Jun 19, 2014
1 parent db0fc37 commit 44d8e1f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void brLibHasCorrectTemplate() throws Exception {
.and(userLib).fileContentsContains("src/userlib/Userlib.js", "var Userlib = {}");
}

@Test
@Test //TODO: thrirdparty libraries should have an improved template - the template exists, but the command doesnt use it when creating thirdparty libraries
public void thirdpartyLibHasCorrectTemplate() throws Exception {
given(brjs).commandHasBeenRun("create-app", "app", "appns");
when(brjs).runCommand("create-library", "app", "thirdpartyLib", "-t", "thirdparty");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"use strict";

var @lib = {}

@lib.helloWorldUtil = function() {
return "Hello World!";
}

window.@lib = @lib;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
server: http://localhost:4224
basepath: .

load:
- bundles/js/js.bundle

test:
- tests/**.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ExampleClassTest = TestCase("ExampleClassTest");

var @lib = require("@lib");

ExampleClassTest.prototype.testHelloWorldUtil = function()
{
assertEquals( "Hello World!", @lib.helloWorldUtil() );
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
css:
depends:
exports: @lib
js:

0 comments on commit 44d8e1f

Please sign in to comment.