-
Notifications
You must be signed in to change notification settings - Fork 7
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
1 parent
0d6599c
commit f9b3d93
Showing
17 changed files
with
200 additions
and
44 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,41 @@ | ||
// Karma configuration | ||
// Generated on Fri Mar 14 2014 15:01:19 GMT-0700 (PDT) | ||
|
||
var babelOptions = require('./config').babel; | ||
|
||
module.exports = function(config) { | ||
|
||
var files; | ||
|
||
files = [ | ||
'test/**/*.js' | ||
]; | ||
|
||
config.set({ | ||
frameworks: ['jasmine', 'browserify', 'sourcemaps'], | ||
|
||
files: [ | ||
'node_modules/karma-babel-preprocessor/node_modules/babel-core/browser-polyfill.js' | ||
// The entry point that dynamically imports all the specs. | ||
//{pattern: 'test-help/main.js', included: true}, | ||
|
||
// The runtime assertion library. | ||
//'node_modules/rtts-assert/dist/cjs/assert.js', | ||
//'node_modules/angular/angular.js', | ||
//'node_modules/angular-mocks/angular-mocks.js' | ||
].concat(files), | ||
|
||
preprocessors: { | ||
'test/**/*.js': ['browserify'] | ||
}, | ||
|
||
browsers: ['Chrome'], | ||
|
||
browserify: { | ||
transform: [ ['babelify', babelOptions] ] | ||
} | ||
|
||
}); | ||
|
||
config.plugins.push(require('./karma_sourcemaps')); | ||
}; |
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
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,25 @@ | ||
export default function ToAnnotation(AnnotationClass) { | ||
var decorator = function(...callParams) { | ||
callParams.unshift(null); | ||
return function(targetClass) { | ||
var oldAnnotation = Object.getOwnPropertyDescriptor(targetClass, 'annotations'); | ||
if (oldAnnotation) { | ||
var oldGetter = oldAnnotation.get | ||
Object.defineProperty(targetClass, 'annotations', { | ||
configurable: true, | ||
get: function() { | ||
return oldGetter().concat([new (Function.prototype.bind.apply(AnnotationClass, callParams))]); | ||
}}); | ||
} else { | ||
Object.defineProperty(targetClass, 'annotations', { | ||
configurable: true, | ||
get: function() { | ||
return [new (Function.prototype.bind.apply(AnnotationClass, callParams))]; | ||
}}); | ||
} | ||
return targetClass; | ||
}; | ||
}; | ||
decorator.originalClass = AnnotationClass; | ||
return decorator; | ||
} |
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
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
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
Oops, something went wrong.