Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8576539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:56:47+00:00 2026-06-11T19:56:47+00:00

For my current project, I’m setting up JS testing with Jasmine. We want our

  • 0

For my current project, I’m setting up JS testing with Jasmine. We want our tests to run automatically on each build, so I plugged it into our Maven build. I can run some basic tests of the Javascript, and everything is working peachy. So far so good!

However, we are building a rich client interface, and doing a lot of callbacks to the server – so, we have a lot of $.ajax calls in our code. Whenever I try to load our JS files that contain the call (not execute tests, the processing isn’t even there yet), the Maven build crashes each time, because it tries to do the callback already:

[ERROR] Caused by: java.io.FileNotFoundException: F:\Users\gjoris\Development\Source\xxx\xxx-war\target\jasmine\rest\xxx\search (The system cannot find the path specified)

So, just to make it very clear: I’m not running tests here, I’m just loading the sources. This is the configuration for my plugin thusfar:

            <plugin>
            <groupId>com.github.searls</groupId>
            <artifactId>jasmine-maven-plugin</artifactId>
            <version>1.2.0.0</version>
            <extensions>true</extensions>
            <executions>
                <execution>
                    <goals>
                        <goal>test</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <sourceIncludes>
                    <include>sorting*.js</include>
                    <include>*blabla*.js</include>
                </sourceIncludes>
                <jsSrcDir>${project.basedir}/src/main/webapp/resources/scripts/</jsSrcDir>
                <jsTestSrcDir>${project.basedir}/src/test/javascript</jsTestSrcDir>
                <timeout>300</timeout>
                <preloadSources>
                    <!-- Load basic libraries for application-->
                    <source>${project.basedir}/src/main/webapp/resources/scripts/libs/knockout-2.1.0.js</source>
                    <source>${project.basedir}/src/main/webapp/resources/scripts/libs/jquery-1.7.2.min.js</source>
                    <!-- Load all necessary Jasmine plugins -->
                    <source>${project.basedir}/src/test/javascript/libs/jasmine-ajax/mock-ajax.js</source>
                    <source>${project.basedir}/src/test/javascript/libs/jasmine-jquery/jasmine-jquery.js</source>
                    <!-- Load our own mocks -->
                    (some of our mocks in JS go here)
                    <!-- Load additional libraries, application specific, which are needed to run -->
                    (some general JS, which are used everywhere)
                </preloadSources>
            </configuration>
        </plugin>

Anybody any experience with this, and knows how I have to configure it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:56:49+00:00Added an answer on June 11, 2026 at 7:56 pm

    I have an answer already, but to be sure, I’ll post it here.

    The problem was that we are using KnockoutJS as well, and that the model, upon load, executed the ajax call.

    What I did now, was to extract the knockout load features into a different JS file, which I’m not loading into my preloaded sources. That way, I can test everything on my model, but the ajax call does not execute on preload. And thus, I can mock the ajax calls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our current project has ran into a circular dependency issue. Our business logic assembly
My current project is broken down into 3 parts: Website, Desktop Client, and a
In my current project, I want to convert List<String> to RegionLabel Object. For instance,
My current project is split into multiple classes that correctly represent the way we
Our current project is made up of Python2.3 and wxPython-2.4.1.2. It is working fine.
For our current project we are required to scan QR-codes via our own application.
Our current project does not use Hibernate (for various reasons) and we are using
Our current project is written in ASP.NET MVC 1 using mvc-turbines (and unity) for
My current project is about doing some changes in an already build web application
My current project involves setting up a bunch of sidebar links, such that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.