I am reading the jasmine docs
Customize spec/support/jasmine.json to enumerate the source files and spec files you would like the Jasmine runner to include. You may use dir glob strings.
However, I cannot find the file path spec\support\jasmine.json
Inside of the node_module for jasmine only exists under this file structure
node_modules >> jasmine >> lib >> examples >> jasmine.json
Am I missing something very basic? I did the install twice and got the same thing.
First you need to run jasmine init, then the following file is created.
If it is not working, install jasmine globally npm install -g jasmine
Regards
Related
I have a project with multiple directories with .sass files in each directory.
I want sass to watch all files and recomplie them if changes happen so sass --watch projectDirworks great but I also want to add a postfix to all compiled file for example myfile.sass will be myfile.post.css.
How do I do that?
If I cannot then is there a way to run batch sass commands from file?
I would suggest using a build tool such as gulp/grunt/webpack to watch your files and the compile your sass.
here is something that could get you started https://css-tricks.com/gulp-for-beginners/
I want to use Karma and Jasmine to test my AngularJS application. All of the documentation I've found to install Karma and Jasmine involve using npm. I can't use npm because I am restricted, the reason doesn't matter. So far I have pulled Jasmine and Karma from Github using zip files. I want to add Karma and Jasmine to my project, but I don't think unzipping the entire contents of the respective GitHub repos is the way to go.
I'd like to know what I need to make Karma and Jasmine usable within my AngularJS project without using npm.
I guess it is possible, but will take a huuuuuge amount of work because of the dependencies. If you take a look at karma's repository, you can find a file package.json (here). In this file there is a property dependencies (link), which lists the modules karma depends on. So you'll have to find their sources, manually download all of them with respective version number and put in the folder called node_modules created in the karma module folder. But each of these modules karma depends on also has dependencies listed in their own package.json - you'll have to download them too keeping in mind version numbers and putting them in module's node_modules folder. And this dependency nesting can be really really deep.
Some modules may have extra scripts to be executed after they have been installed (scripts), which are called by NPM by default on installation. Maybe there are some other things which I am not aware of. Generally speaking it was designed to be installed via NPM and it's rarely the case when someone has no access to use it.
I would advise to ask somebody who has access to NPM to do an install of required packages and share the result of installation with you. Everything will be installed in the node_modules folder of the directory you run NPM commands from, it would be easy to do.
Here you can download version I've created, it has karma v0.13.1, karma-jasmine v0.3.6 and karma-chrome-launcher v0.2.0. I hope it will work for you, because we might have different OS (mine is Ubuntu 14.04 x64), I'm not sure if NPM does something OS-specific while installation of any package.
You should place the content of the archive to your project directory, to execute tests from your project folder use a terminal command:
./node_modules/karma/bin/karma start
I would still advise to solve the problem of accessing the NPM if you want to closely work with modules it stores.
I am trying to implement TDD in BatmanJS, but the Batman.TestCase class is an extra. How do i include it from github in my rails app as sugested here?
Unfortunately, Batman.TestCase isn't included in any of the distributed builds for batman.js. If you want to use it, you'll have to copy the files yourself. You could get those files into your Rails project by cloning the Github repository, then copying the src/extras/testing directory into your project's app/assets/batman/extras/testing directory.
For example, you could run these commands in your terminal:
$ cd /path/to/your/projects
$ git clone git#github.com:batmanjs/batman.git
$ mkdir -p your_project/app/assets/batman/extras/testing
$ cp -R batman/src/extras/testing your_project/app/assets/batman/extras/testing
Now, you should have all the contents of that directory inside your app and TestCase should be available on your development server at /assets/extras/testing/test_case.js.
(If it isn't there, try /assets/extras/test_case.js or just /assets/test_case.js. I know Sprockets does something special with asset paths, but I can't remember what!)
By the way, I've had good luck with just jasmine for tests :) Hope this helps!
I'm using Foundation 4 standalone as a read-only git submodule in a project, and need combine all of its scss files into an umbrella project.scss file, which then gets compiled to project.css.
I'm using Compass to compile, however it compiles any scss file not appended with underscore, so both foundation/scss/normalize.scss and foundation/scss/foundation.scss get compiled twice each - once each standalone, and also into my project.scss file that imports both.
Is there any way to prevent compilation besides appending an underscore to normalize.scss and foundation.scss? I'd rather not append the underscore b/c I want to use the Foundation standalone project exactly as is from the official repo, and simply import it into the project-specific project.scss where all the customizations reside.
Edit: More explanation - I'm using a Scala framework managed by SBT, which makes a system call to Compass compile via an SBT plugin. Compass compile still reads config.rb in my project root for source and target dirs, but I'm not sure what/if other Compass tricks are available in this setup.
I was rather hoping for some kind of syntax trick in config.rb or a Compass command line flag that could tell it to, say, compile all .scss files in [project root]/sass, but not recursively, eg, don't compile anything in [project root]/sass/foundation or other subdirectories. Anyone know anything like that?
The solution is simple: do not include Foundation files into your project.
Instead, install it as a Compass extension and require it from your Compass config.
Note that installing via Gemfile (bundler) is preferred over installing manually with gem install.
I create a ruby project in netbeans 6.9.1, and wrote some source ruby files under lib dir, then wrote test cases under test dir. But when i right click the test case file and choose 'Test File', error occurs, the test file can not load the ruby source file under lib dir and gems even though i required them. i printed $LOAD_PATH, it really doesn't load the lib source files and gems.
Could someone help me on how to resolve the problem in netbeans? Thank you in advance.
resolved.
one is to add -I option, the other is related to Log4r::INFO