Releases: fvanwijk/mox
Releases · fvanwijk/mox
V0.7.1
V0.6.0
Removed deprecated helper methods from Mox because they depend on other libs, they are not used a lot or they are not really shorter.
mockDate: supported by Jasmine 2getMockData: depends on jasmine-jquery and is not the best method for all situationsnoop: useangular.noopcompileHtmlOnDom:compileappends the compiled html to the DOM by defaultremoveCompiledHtmlFromDom: is done whencompileis calleddefer,when,all: better to inject$qand use its methodsrestangularPromise:resourcePromisedoes the sameextendElement,extendedElementWithChildren: is replaced byaddSelectors, which is better and has more features.
V0.5.1
V0.5.0
Reorganized internal structure:
mox.getcache is cleaned after every test.- When mocking a service, the original service is not replaced with a spy object (or spy in case of a filter), but we spy on its methods. Memory footprint is increased a bit, but you now can call
.andCallThroughon the methods (#9). .andRespondis implemented for Jasmine 2.- Transcluded content is not mocked by default when mockDirectives is used (#7).
V0.4.3
Fixed bug in directives mocking. In Angular 1.3 it was not possible to mock a directive without an isolate scope. Now the directive mocks wil be based in the original directive (and the mock DDO overwrites some properties) instead of based on the mock.
v0.4.2
v0.4.1
- Cleaned up the bower dependencies: ignored dev files and made the dependent versions less strict
- Using
dist/mox.jsas main file, so that it is working again with wiredep - Copying less DDO properties when mocking a directive mocking, because the DDO is changed in Angular 1.4
createMock()can also create mocks for constants (directly or by usingsetupResults)
v0.4.0
- Added
addSelectorsmethod to create lazy element selections for your view specs. - Added method
mox.inject()to inject services without the need of a inject function wrapper. mox.modulenow supports multiple module names and the parameter order is not relevant anymore- Finally added specs, so some small bugs are fixed.
- Deprecated a lot of methods that are barely used or replaced by better ones.
v0.3.3
- Mock constants using
mox.mockConstants() - Appending compiled and linked elements to
document.bodyor the the template defined inmox.testTemplatePath - $scope that is created with
createScopeand the compiled element is set on thecurrentSpec, so that you can access the created scope/element in the spec by callingthis.scope/this.element. - $scope argument is optional when calling
createController,compileHtmlorcompileTemplate. The scope on the currentSpec is used instead.
v0.3.2
- Added dependency on jasmine-mox-matchers
- Passing an array with mock names is not allowed anymore. Just pass multiple arguments
.mockControlleris renamed to.mockControllers- Return values of
createScope,compileHtmlandcompileTemplateare set on the currentSpec so you can access it viathis.$scopeandthis.element - Do not clear the jQuery cache (done by angular-mocks in some older versions) because that makes impossible to compile element in
beforeAllfor reuse by.toContainIsolateScopematcher and events.