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.noop
compileHtmlOnDom
:compile
appends the compiled html to the DOM by defaultremoveCompiledHtmlFromDom
: is done whencompile
is calleddefer
,when
,all
: better to inject$q
and use its methodsrestangularPromise
:resourcePromise
does the sameextendElement
,extendedElementWithChildren
: is replaced byaddSelectors
, which is better and has more features.
V0.5.1
V0.5.0
Reorganized internal structure:
mox.get
cache 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
.andCallThrough
on the methods (#9). .andRespond
is 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.js
as 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
addSelectors
method 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.module
now 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.body
or the the template defined inmox.testTemplatePath
- $scope that is created with
createScope
and 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
,compileHtml
orcompileTemplate
. 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
.mockController
is renamed to.mockControllers
- Return values of
createScope
,compileHtml
andcompileTemplate
are set on the currentSpec so you can access it viathis.$scope
andthis.element
- Do not clear the jQuery cache (done by angular-mocks in some older versions) because that makes impossible to compile element in
beforeAll
for reuse by.toContainIsolateScope
matcher and events.