mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Update meteor create --full to use meteortesting:mocha (#9489)
This commit updates the `meteor create --full` app skeleton to use `meteortesting:mocha` (and npm based `chai`), instead of the deprecated `practicalmeteor:mocha` package.
This commit is contained in:
@@ -796,7 +796,12 @@ main.registerCommand({
|
||||
// the packages (or maybe an unpredictable subset based on what happens to be
|
||||
// in the template's versions file).
|
||||
|
||||
require("./default-npm-deps.js").install(appPath);
|
||||
// Since some of the project skeletons include npm `devDependencies`, we need
|
||||
// to make sure they're included when running `npm install`.
|
||||
require("./default-npm-deps.js").install(
|
||||
appPath,
|
||||
{ includeDevDependencies: true }
|
||||
);
|
||||
|
||||
var appNameToDisplay = appPathAsEntered === "." ?
|
||||
"current directory" : `'${appPathAsEntered}'`;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
|
||||
const INSTALL_JOB_MESSAGE = "installing npm dependencies";
|
||||
|
||||
export function install(appDir) {
|
||||
export function install(appDir, options) {
|
||||
const packageJsonPath = pathJoin(appDir, "package.json");
|
||||
const needTempPackageJson = ! statOrNull(packageJsonPath);
|
||||
|
||||
@@ -25,9 +25,13 @@ export function install(appDir) {
|
||||
}
|
||||
|
||||
const ok = buildmessage.enterJob(INSTALL_JOB_MESSAGE, function () {
|
||||
const { runNpmCommand } = require("../isobuild/meteor-npm.js");
|
||||
const npmCommand = ["install"];
|
||||
if (options && options.includeDevDependencies) {
|
||||
npmCommand.push("--production=false");
|
||||
}
|
||||
|
||||
const installResult = runNpmCommand(["install"], appDir);
|
||||
const { runNpmCommand } = require("../isobuild/meteor-npm.js");
|
||||
const installResult = runNpmCommand(npmCommand, appDir);
|
||||
if (! installResult.success) {
|
||||
buildmessage.error(
|
||||
"Could not install npm dependencies for test-packages: " +
|
||||
|
||||
@@ -21,6 +21,5 @@ kadira:flow-router # FlowRouter is a very simple router for Meteor
|
||||
kadira:blaze-layout # Layout manager for blaze (works well with FlowRouter)
|
||||
less # Leaner CSS language
|
||||
|
||||
|
||||
practicalmeteor:mocha # A package for writing and running your meteor app and package tests with mocha
|
||||
meteortesting:mocha # A package for writing and running your meteor app and package tests with mocha
|
||||
johanbrook:publication-collector # Test a Meteor publication by collecting its output
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// https://guide.meteor.com/testing.html
|
||||
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { assert } from 'meteor/practicalmeteor:chai';
|
||||
import { assert } from 'chai';
|
||||
import { Links } from './links.js';
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// https://guide.meteor.com/testing.html
|
||||
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { assert } from 'meteor/practicalmeteor:chai';
|
||||
import { assert } from 'chai';
|
||||
import { Links } from './links.js';
|
||||
import './methods.js';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// https://guide.meteor.com/testing.html
|
||||
|
||||
import { assert } from 'meteor/practicalmeteor:chai';
|
||||
import { assert } from 'chai';
|
||||
import { Links } from '../links.js';
|
||||
import { PublicationCollector } from 'meteor/johanbrook:publication-collector';
|
||||
import './publications.js';
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
"name": "~name~",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "meteor run"
|
||||
"start": "meteor run",
|
||||
"test": "meteor test --once --driver-package meteortesting:mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0-beta.34",
|
||||
"meteor-node-stubs": "^0.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user